summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* remove index offsetting ($[)Zefram2011-09-0937-472/+83
| | | | | | $[ remains as a variable. It no longer has compile-time magic. At runtime, it always reads as zero, accepts a write of zero, but dies on writing any other value.
* Correct mro.c typo added by 006d9e7b3Father Chrysostomos2011-09-091-1/+1
|
* release Carp-1.23 to CPANZefram2011-09-093-3/+3
|
* make Carp::Heavy load Carp for backcompatZefram2011-09-093-1/+13
|
* When probing strxfrm, consider a consistent return value of 0 as saneNicholas Clark2011-09-091-1/+1
|
* Provide more information in the message for "strxfrm() gets absurd".Nicholas Clark2011-09-093-2/+8
| | | | | Prefix it with "panic", report the two lengths that caused the sanity test failure, and add the message to perldiag.pod.
* Remove a Devel::DProf error from perldiag.podNicholas Clark2011-09-091-7/+0
| | | | | Devel::DProf is no longer in the core distribution, hence the core distribution can no longer generate this particular warning message.
* In pp_chdir, move SvGETMAGIC(sv) out of the if() condition.Nicholas Clark2011-09-091-7/+10
| | | | | | It was added to the if() condition as part of 935647290357b277. Unfortunately the syntax used to implemented SvGETMAGIC(sv) is considered by gcc to be valid in an expression, but is not valid in other compilers.
* Collapse some code in shared.xsFather Chrysostomos2011-09-081-25/+9
| | | | | In the previous commit, I added duplicate code to make it obvious what was going on.
* [perl #98204] Shared objects not destoryedFather Chrysostomos2011-09-083-55/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Jerry wrote: > threads::shared objects stored inside other > threads::shared structures are not properly destroyed. > When a threads::shared object is 'removed' from a > threads::shared structure (e.g., a hash), the object's > DESTROY method is not called. Later, he said: > When PL_destroyhook and Perl_shared_object_destroy were > added, the problem they were overcoming was that the > destruction of each threads::shared proxy was causing the > underlying shared object's DESTROY method to be called. The > fix provided a refcount check on the shared object so that > the DESTROY method was only called with the shared object > was no longer in use. > > The above works fine when delete() and pop() are used, > because a proxy is created for the stored shared object that > is being deleted (i.e., the value returned by the delete() > call), and when the proxy is destroyed, the object's DESTROY > method is called. > > However, when the stored shared object is 'removed' in some > other manner (e.g., setting the storage location to > 'undef'), there is no proxy involved, and hence DESTROY does > not get called for the object. This commit fixes that by modifying sharedsv_scalar_store, sharedsv_scalar_mg_free and sharedsv_array_mg_CLEAR. Each of those functions now checks whether the current item being freed has sub-items with reference counts of 1. If so, that means the sub-item will be freed as a result of the outer SV’s being freed. It also means that there are no proxy objects and that destructors will hence not be called. So it pushes a new proxy on to the calling con- text’s mortals stack. If there are multiple levels of nested objects, then, when the proxy on the mortals stack is freed, it triggers sharedsv_scalar_mg_free, which goes through the process again. This does not fix the problem for shared objects that still exist (without proxies) at global destruction time. I cannot make that work, as circularities will cause new proxies to be created continu- ously and pushed on to the mortals stack. Also, the proxies may end up being created too late during global destruction, after the mor- tals stack has been emptied, and when there is not enough of the run- time environment left for destructors to run. That will happen if the shared object is referenced by a shared SV that is not an object. The calling context doesn’t know about the object, so it won’t fire the destructor at the object-destroying stage of global destruction. Detecting circularities is also problematic: We would have to keep a hash of ‘seen’ objects in the shared space, but then how would we know when to free that? Letting it leak would affect embedded environments. So this whole trick of creating mortal proxy objects is skipped during global destruction.
* shared.xs: Refactor to simplify S_get_RV’s callersFather Chrysostomos2011-09-081-17/+16
| | | | | | | | | | | | | | | | | | | | | Every function that calls S_get_RV needs this same incantation: S_get_RV(aTHX_ sv, ssv); /* Look ahead for refs of refs */ if (SvROK(SvRV(ssv))) { SvROK_on(SvRV(sv)); S_get_RV(aTHX_ SvRV(sv), SvRV(ssv)); } Also, S_get_RV keeps repeating SvRV(ssv), even though it assigns it to sobj at the top. Also, an upcoming commit will need the ability to pass the referent to S_get_RV. So this patch changes S_get_RV to accept a referent instead (eliminat- ing its multiple use of SvRV) and adds a get_RV macro to take care of the standard calling rite.
* Simplify example pack code in perlpacktutMark Jason Dominus2011-09-091-2/+1
|
* Enter gv_fetchsv_nomgFather Chrysostomos2011-09-085-41/+15
| | | | | | | | | | | There are so many cases that use this incantation to get around gv_fetchsv’s calling of get-magic-- STRLEN len; const char *name = SvPV_nomg_const(sv,len); gv = gv_fetchpvn_flags(name, len, flags | SvUTF8(sv), type); --that it’s about time we had a shorthand.
* remove bogus < in B<> formatting codeRicardo Signes2011-09-081-1/+1
|
* add known issues for new OO docsDave Rolsky2011-09-081-0/+3
|
* some small fixes to make porting/podcheck.t happyDave Rolsky2011-09-083-24/+24
|
* Tweak line length of comment in verbatim section per podcheck.tDave Rolsky2011-09-081-2/+2
|
* Lots of updates based on feedback from sprout, including a few new sectionsDave Rolsky2011-09-081-80/+177
|
* Some changes based no sprout's feedbackDave Rolsky2011-09-081-17/+17
|
* fix now-broken link to removed section in perlobjDave Rolsky2011-09-081-1/+1
|
* Add perldelta entries for all doc changesDave Rolsky2011-09-081-10/+13
|
* Redo all examples using File and File::MP3Dave Rolsky2011-09-081-114/+122
|
* Remove all references to old OO tutorial docs, and add refs to perlootut ↵Dave Rolsky2011-09-0817-58/+27
| | | | | | where appropriate Used buildtoc to regenerate pod-related files
* remove all old OO tutorials (and perlbot)Dave Rolsky2011-09-084-4597/+0
|
* Small revisions to the text to increase clarity, suggested by Philip MonsenDave Rolsky2011-09-081-10/+10
|
* Add more details on inside-out objects from David Golden, and an inside-out ↵Dave Rolsky2011-09-081-7/+40
| | | | | | class example from Abigail. Add strict & warning to blessed scalar class example
* heavily revised perlobj.podDave Rolsky2011-09-081-482/+730
|
* Use same list of "when to use OO" criteria in perlmodstyle as in perlootutDave Rolsky2011-09-081-27/+30
| | | | | See my previous commit message for permission from ORA to use this text under the same license as Perl itself.
* Add Damian's list of when to use OO - copied from PBPDave Rolsky2011-09-081-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Here's the email from Teri Finn at O'Reilly giving us permission to do so: ------------------------------------------------------------------------- Dave, O'Reilly Media is happy to grant you the permissions you have requested below. If you are able to include the copyright notice in the attribution that would be great. Damian Conway wrote about when to use OO in Perl Best Practices, Copyright © 2004, Published by O'Reilly Media, Inc. His list of criteria for doing so is: Our best to you on your project. Teri Finn O'Reilly Media, Inc. ----- Original Message ----- From: "Dave Rolsky" <autarch@urth.org> To: permissions@oreilly.com Cc: damian@conway.org Sent: Sunday, March 6, 2011 6:58:34 PM GMT -08:00 US/Canada Pacific Subject: Usage of text from Perl Best Practices Hi, ORA, I'm working on the Perl 5 core documentation, specifically on a new OO tutorial. I'd like to include Damian's "when to use OO" list as published in Perl Best Practices (pages 320-321). I don't want to include the entire text verbatim, just the bullet points. I wrote to Damian and he is okay with having this included in the docs, just as an FYI. To do this, I'd need permission to include the text and distribute it under the same license as Perl 5 itself, which is currently version 1 of the Artistic license. I would of course credit Damian and note the book, something like .... Damian Conway wrote about when to use OO in Perl Best Practices. His list of criteria for doing so is: Thanks, -dave
* Check in new OO tutorial - perlootutDave Rolsky2011-09-081-0/+677
|
* ch(dir|mod|own) should not ignore get-magic on glob(ref)sFather Chrysostomos2011-09-084-9/+24
| | | | | | | | When the chdir(*handle) feature was added in 5.8.8, the fact that globs and refs could be magical was not taken into account. They can easily be magical if a typeglob or reference is returned from or assigned to a tied variable.
* Call get-magic once for *glob=$tiedFather Chrysostomos2011-09-083-3/+12
| | | | This is a regression in 5.10.0.
* Update perlfaq to CPAN version 5.0150033Chris 'BinGOs' Williams2011-09-0813-2877/+2856
| | | | | | | | | | | | | | [DELTA] 5.0150033 Tue 30 Aug 2011 21:46:25 +0100 * Perl 6 changes (apeiron) * Replace tabs with spaces (ranguard) * Link to www.cpan.org/ports/ for binary (ranguard) * Switch C<> over to L<> for any module on CPAN (ranguard) * Change brace stype (apeiron) * Extra dzil tests (rafl) * Changes so more semantic, and better rendered HTML (ranguard) * Point to repo for how to update perlfaq (ranguard)
* Update Module-Load-Conditional to CPAN version 0.46Chris 'BinGOs' Williams2011-09-083-3/+7
| | | | | | | | [DELTA] Changes for 0.46 Wed Sep 7 23:57:03 BST 2011 ================================================= * Use || instead of "or" (perl#78708) (chorny)
* remove unused variables and assignmentsRobin Barker2011-09-083-6/+3
| | | | | | and silences some compiler warnings. I do not understand the code in toke.c but the change aligns the code with other uses of FUN0OP, it has no warnings and does not break any test.
* Suppress warning from tie_fetch_count.tFather Chrysostomos2011-09-081-0/+1
|
* avoid " in Carp.t test programs, due to Win32 shell issuesTony Cook2011-09-081-3/+3
| | | | | | Win32 doesn't have a real execv(), so the " end up in the command-line, interfering with the normal quoted command-line processing.
* Increase $attributes::version to 0.16Father Chrysostomos2011-09-071-1/+1
|
* Convert some files from Latin-1 to UTF-8Keith Thompson2011-09-0747-51/+54
|
* Update Module-Metadata to CPAN version 1.000007Chris 'BinGOs' Williams2011-09-073-3/+3
| | | | | | | [DELTA] 1.0.7 2001-09-07 12:00:00 - Apply VMS fixes backported from blead (Craig A. Berry)
* In Dumper.xs, use sv_newmortal() instead of sv_mortalcopy(&PL_sv_undef).Nicholas Clark2011-09-073-4/+10
| | | | | The two produce identical results. The former is terser, and far more efficient.
* ODBM_File can use the same T_PTROBJ typemap as the other ?DBM_File modules.Nicholas Clark2011-09-074-3/+12
| | | | | | | | This simplifies the RETVAL handling in TIEHASH, and makes the code closer to the other 3 ?DBM_File modules. The difference in TIEHASH handling dates back to 5.000, where only ODBM_File needed helper code around the dbm_open() call. The other 3 were able to #define it as dbm_TIEHASH, and hence had no CODE: section when first written.
* Update Module-Metadata to CPAN version 1.000006Chris 'BinGOs' Williams2011-09-074-7/+47
| | | | | | | | | | | | | | | [DELTA] 1.0.6 2011-08-29 04:00:00 - Support PACKAGE BLOCK syntax (VPIT) [Additional info] Reapplied the changes made by Craig Berry for VMS in commit 63f27fd71dd22aa00021eb1e4fde4faa55ec9524 Raised [https://rt.cpan.org/Public/Bug/Display.html?id=70781] to upstream these changes.
* In Glob.xs, use memset() instead of bzero()Nicholas Clark2011-09-061-1/+1
| | | | 3c97495f56fb647c used bzero(), which isn't available on some platforms.
* Release managers guide changed to rmv stale perldeltasKarl Williamson2011-09-061-2/+30
| | | | | | We have decided to not deliver the BLEAD-POINT perldeltas, as their information should have been consolidated into the BLEAD-FINAL perldelta.
* Remove old odd-numbered releases perldeltasKarl Williamson2011-09-0632-17218/+0
| | | | | | | | The odd-numbered releases are for internal development, and their individual perldeltas are collated togeter for the next even numbered dot 0 release. This means that the individual perldeltas are no longer useful once that dot 0 release is made, and they clutter things up, giving duplicate information.
* RT #4682: given() didn't scope $_ correctlyDavid Mitchell2011-09-062-1/+31
| | | | | | | given(expr) {...} behaves similarly to { my $_ = expr; ...}, except that, prior to this commit, it wasn't doing the SAVECLEARSV() that pp_padsv would do. This meant that $_ was still marked as stale while in scope, and wasn't getting cleared at the end of scope.
* S_op_integerize() needs a dVAR, else -DPERL_GLOBAL_STRUCT doesn't build.Nicholas Clark2011-09-061-0/+1
|
* ExtUtils::ParseXS: Fix INCLUDE: $cmd |Steffen Mueller2011-09-062-1/+3
| | | | | | | | INCLUDE: $cmd | is the old, deprecated way of reading the output of a command into a stream of XS code. Unfortunately, it was accidentally broken by fe7ae66bc2e4a8bbc90ba0d852e511116d6e97bb by replacing the two-arg open with a three-arg open that opens in read-mode. This change fixes the issue, reported as CPAN RT #70213.
* Move non-constant folding parts of fold_constants into a separate functions.Gerard Goossen2011-09-054-22/+56
| | | | | | | | | | The non-constant folding parts of fold_constants are moved into separate functions. op_integerize handles converting ops to integer (and special case of OP_NEGATE), op_std_init handling some standard functionality (forced scalar context and allocating the TARGET). Both functions are called where fold_constants is called (but we might want to make that a bit some selective and use op_std_init in other places).