| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
$[ 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.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Prefix it with "panic", report the two lengths that caused the sanity test
failure, and add the message to perldiag.pod.
|
|
|
|
|
| |
Devel::DProf is no longer in the core distribution, hence the core
distribution can no longer generate this particular warning message.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
In the previous commit, I added duplicate code to make it obvious what
was going on.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
where appropriate
Used buildtoc to regenerate pod-related files
|
| |
|
| |
|
|
|
|
|
|
| |
class example from Abigail.
Add strict & warning to blessed scalar class example
|
| |
|
|
|
|
|
| |
See my previous commit message for permission from ORA to use this text under
the same license as Perl itself.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
This is a regression in 5.10.0.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[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)
|
|
|
|
|
|
|
|
| |
[DELTA]
Changes for 0.46 Wed Sep 7 23:57:03 BST 2011
=================================================
* Use || instead of "or" (perl#78708) (chorny)
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
Win32 doesn't have a real execv(), so the " end up in the
command-line, interfering with the normal quoted command-line
processing.
|
| |
|
| |
|
|
|
|
|
|
|
| |
[DELTA]
1.0.7 2001-09-07 12:00:00
- Apply VMS fixes backported from blead (Craig A. Berry)
|
|
|
|
|
| |
The two produce identical results. The former is terser, and far more
efficient.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[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.
|
|
|
|
| |
3c97495f56fb647c used bzero(), which isn't available on some platforms.
|
|
|
|
|
|
| |
We have decided to not deliver the BLEAD-POINT perldeltas, as their
information should have been consolidated into the BLEAD-FINAL
perldelta.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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).
|