This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
13 years agoSome tests for Perl_grok_number().
Nicholas Clark [Thu, 23 Sep 2010 14:16:05 +0000 (15:16 +0100)]
Some tests for Perl_grok_number().

Not yet comprehensive - only tests the integer conversion code paths.

13 years agoSet default static inline for Netware/config.wc.
Andy Dougherty [Thu, 23 Sep 2010 14:07:41 +0000 (10:07 -0400)]
Set default static inline for Netware/config.wc.

If anyone knows how to support static inline on Netware,
a patch would be appreciated.

13 years agoAdd default setting of perl_static_inline='static' to all win32 configs.
Andy Dougherty [Thu, 23 Sep 2010 13:56:11 +0000 (09:56 -0400)]
Add default setting of perl_static_inline='static' to all win32 configs.

Win32 users who know better are invited to change the definitions
as appropriate, but this should at least allow it to build.

13 years agoSet d_static_inline for win32/config.vc, since VC supports static __inline.
Andy Dougherty [Thu, 23 Sep 2010 13:53:43 +0000 (09:53 -0400)]
Set d_static_inline for win32/config.vc, since VC supports static __inline.

13 years agoMake dquote_static.c available to ext/re/
Tony Cook [Thu, 23 Sep 2010 10:44:37 +0000 (20:44 +1000)]
Make dquote_static.c available to ext/re/

Under Win32 the main perl source directory isn't in the C include
path, so as we do with the re source files, copy dquote_static.c to
the ext/re directory.

13 years agoConfigure inline support for 32-bit VC++
Tony Cook [Thu, 23 Sep 2010 10:43:44 +0000 (20:43 +1000)]
Configure inline support for 32-bit VC++

VC supports static inline via "static __inline".

13 years ago[perl #71806] perldb does not setup %dbline with the shebang option -d
Father Chrysostomos [Thu, 23 Sep 2010 08:38:10 +0000 (01:38 -0700)]
[perl #71806] perldb does not setup %dbline with the shebang option -d

The first time gv_fetchfile is called for a particular file, it
creates the glob and, if debugging is on, creates an AV. If the glob
already exists (i.e., in subsequent calls), the AV is not created. The
attached patch moves the check for debugging mode and the creation of
the AV outside the if-block that checks whether the glob exists.

This bug seems to have existed for a very long time and has been
intermittent. It seems that many different things can change the order
in which #!perl -d and gv_fetchfile occur. Whether compilation options
affect it I do not know. I can reproduce it in 5.6.2, 5.8.[123456]
(non-threaded) and 5.11.3 (both threaded and non-threaded), but not
5.8.[789] or 5.10.[01] (threaded).

13 years agoperldelta for bug #70615 + tweaks
Father Chrysostomos [Thu, 23 Sep 2010 08:01:20 +0000 (01:01 -0700)]
perldelta for bug #70615 + tweaks

13 years agoFix code-before-declaration problem in universal.c
Steve Hay [Thu, 23 Sep 2010 07:28:32 +0000 (08:28 +0100)]
Fix code-before-declaration problem in universal.c

13 years ago[perl #70614] Seg. fault with eval/use/UNITCHECK/DESTROY/eval combination
Father Chrysostomos [Thu, 23 Sep 2010 06:47:11 +0000 (23:47 -0700)]
[perl #70614] Seg. fault with eval/use/UNITCHECK/DESTROY/eval combination

This case can be reduced to:
eval "UNITCHECK{ eval 0 }"

(eval 0 triggers the bug more reliably than eval ''.)

The inner eval clobbers PL_eval_start, so when the UNITCHECK finishes,
the outer eval tries to call the inner eval’s code, which has been
freed already.

This commit saves PL_eval_start and restores it after UNITCHECK.

13 years agoRemove unneeded 'use' from ext/XS-APItest/t/peep.t Devel::Peek is not used by ext...
Jerry D. Hedden [Wed, 22 Sep 2010 20:36:14 +0000 (16:36 -0400)]
Remove unneeded 'use' from ext/XS-APItest/t/peep.t Devel::Peek is not used by ext/XS-APItest/t/peep.t, so remove it from the test code.

13 years agoregcomp.c: Convert some things to use cBOOL()
Karl Williamson [Tue, 21 Sep 2010 21:09:12 +0000 (15:09 -0600)]
regcomp.c: Convert some things to use cBOOL()

13 years agore.pm: Change comment to use new (?^...)
Karl Williamson [Tue, 21 Sep 2010 01:16:24 +0000 (19:16 -0600)]
re.pm: Change comment to use new (?^...)

13 years agoAdd /d, /l, /u (infixed) regex modifiers
Karl Williamson [Tue, 21 Sep 2010 00:57:24 +0000 (18:57 -0600)]
Add /d, /l, /u (infixed) regex modifiers

This patch adds recognition of these modifiers, with appropriate action
for d and l.  u does nothing useful yet.  This allows for the
interpolation of a regex into another one without losing the character
set semantics that it was compiled with, as for the first time, the
semantics is now specified in the stringification as one of these
modifiers.

To this end, it allocates an unused bit in the structures.  The off-
sets change so as to not disturb other bits.

13 years agoChange .t to use new (?^...)
Karl Williamson [Tue, 21 Sep 2010 00:31:00 +0000 (18:31 -0600)]
Change .t to use new (?^...)

There is a line in this .t which uses the old regex stringification.
The contents are not currently tested for, but for cleanliness, change
to the new.

13 years agoChange comments, documentation for new (?^...)
Karl Williamson [Tue, 21 Sep 2010 00:29:59 +0000 (18:29 -0600)]
Change comments, documentation for new (?^...)

I overlooked these earlier in adding the caret notation.

13 years agoChange to use mnemonic instead of char constant
Karl Williamson [Tue, 21 Sep 2010 00:26:33 +0000 (18:26 -0600)]
Change to use mnemonic instead of char constant

The new '^' in (?^...) should really be a macro.

13 years agohandy.h: isASCII() extend to work on > 8 bit values
Karl Williamson [Sun, 19 Sep 2010 18:29:02 +0000 (12:29 -0600)]
handy.h: isASCII() extend to work on > 8 bit values

Prior to this patch, if isASCII() is called with something like '256',
it would return true.

For some reason unknown to me, U64 is defined only inside the perl core.
However, the equivalent U64TYPE is known everywhere, so in the macro
that can be called outside of core, use that instead.

The commit log doesn't give a reason for not defining U64 outside of
core, and no tests in the suite fail when it is defined outside core.
But out of caution, I'm just doing this workaround instead of exposing
U64.

13 years agohandy.h: Don't use isascii() as not in all libc's
Karl Williamson [Sun, 19 Sep 2010 17:57:04 +0000 (11:57 -0600)]
handy.h: Don't use isascii() as not in all libc's

EBCDIC platforms use isascii(), but is not in all libc's so better to
use our own.

13 years agohandy.h: Fix-up documentation
Karl Williamson [Sun, 19 Sep 2010 17:04:34 +0000 (11:04 -0600)]
handy.h: Fix-up documentation

Previous documentation was wrong for EBCDIC platforms.  This fixes that
and adds some more explanation.

13 years agohandy.h: toUPPER is not a char class fcn
Karl Williamson [Sun, 19 Sep 2010 16:38:14 +0000 (10:38 -0600)]
handy.h: toUPPER is not a char class fcn

toUPPER() and toLOWER() were grouped with the character class functions
(in perlapi), to which they are related, but aren't the same.  Create a
new heading for these.

13 years agoautodoc.pl: Allow heading level documentation
Karl Williamson [Sun, 19 Sep 2010 16:20:58 +0000 (10:20 -0600)]
autodoc.pl: Allow heading level documentation

This patch changes autodoc.pl to accept text that is to come immediately
after headings, so that it applies to across the whole section, and not
just to an individual function within that section.

13 years agoAdd lib to @INC in t/base/rs.t
Father Chrysostomos [Wed, 22 Sep 2010 20:10:19 +0000 (13:10 -0700)]
Add lib to @INC in t/base/rs.t

t/base/rs.t needs to @INClude the lib directory before requiring
PerlIO::scalar, even if the require is in an eval, because it will
otherwise pick up a previously-installed copy.

Since 87b9e1600 (Eliminate PL_* accessor functions under ithreads), a
binary-incompatible change, I’ve been getting these errors:

t/base/rs......................................................dyld: lazy symbol binding failed: Symbol not found: _Perl_Istack_sp_ptr
  Referenced from: /usr/local/lib/perl5/5.13.5/darwin-thread-multi-2level/auto/PerlIO/scalar/scalar.bundle
  Expected in: dynamic lookup

dyld: Symbol not found: _Perl_Istack_sp_ptr
  Referenced from: /usr/local/lib/perl5/5.13.5/darwin-thread-multi-2level/auto/PerlIO/scalar/scalar.bundle
  Expected in: dynamic lookup

FAILED--no leader found
Failed a basic test (base/rs.t) -- cannot continue.
make: *** [test] Error 255

13 years agoRun perl regen.pl after removing regcurly from embed.fnc.
Andy Dougherty [Wed, 22 Sep 2010 17:45:47 +0000 (13:45 -0400)]
Run perl regen.pl after removing regcurly from embed.fnc.

Since regcurly is now a static inline function, it no longer
needs to appear in embed.fnc.  embed.pl doesn't quite have the
right flags to deal with static inline functions, so I just
removed regcurly entirely.  It's not for embedding or exporting
anyway.

13 years agoExtract regcurly as a static inline function.
Andy Dougherty [Wed, 22 Sep 2010 17:44:36 +0000 (13:44 -0400)]
Extract regcurly as a static inline function.

This patch extracts regcurly from regcomp.c and converts it
to a static inline function in a new file dquote_static.c
that is now #included by regcomp.c and toke.c.  This change
will require 'make regen'.

13 years agoRemove @extvars from embed.pl
Nicholas Clark [Wed, 22 Sep 2010 16:32:15 +0000 (17:32 +0100)]
Remove @extvars from embed.pl

It's been unused since PERL_POLLUTE was removed in cfef31b27d1a56cd.

13 years agoAdd missing newline to macro_to_ifndef in ExtUtils::Constant::Base
Jerry D. Hedden [Wed, 22 Sep 2010 13:17:14 +0000 (09:17 -0400)]
Add missing newline to macro_to_ifndef in ExtUtils::Constant::Base

13 years agoIn embed.pl, replace C<$ret .=> with C<$ret => when we know that $ret is "".
Nicholas Clark [Wed, 22 Sep 2010 15:05:40 +0000 (16:05 +0100)]
In embed.pl, replace C<$ret .=> with C<$ret => when we know that $ret is "".

Remove one unnecessary initialisation of $ret to "", when all code paths beyond
assign to it. Remove one $ret completely (from &write_global_sym).

13 years agoRemove &munge_c_files from embed.pl, as it has never been used.
Nicholas Clark [Wed, 22 Sep 2010 14:25:17 +0000 (15:25 +0100)]
Remove &munge_c_files from embed.pl, as it has never been used.

It was added, with the only call to it commented out, in cea2e8a9dd23747f.
This means that walk_table's support for undef meaning 'no output' can
removed.

13 years agoEmit $_ to Perl_$_ for "nocontext" functions under multiplicity.
Nicholas Clark [Wed, 22 Sep 2010 14:04:00 +0000 (15:04 +0100)]
Emit $_ to Perl_$_ for "nocontext" functions under multiplicity.

(Strictly for all functions with variable arguments, but *no* explicit
interpreter context arguments. Most of these are *_nocontext.)

We're already emitting macros for the non-multiplicity case, and as these
functions don't need an aTHX_ adding, there's no C portability reason why
we can't generate them here too. So do so, for consistency.

13 years agoIn embed.pl, refactor walk_table to simplify its arguments.
Nicholas Clark [Wed, 22 Sep 2010 13:21:11 +0000 (14:21 +0100)]
In embed.pl, refactor walk_table to simplify its arguments.

No need to pass in leader and have it default to do_not_edit ($filename),
as the only time the leader is needed is for the case of explicit open file
by name. Use undef instead of '/dev/null' to signal that no output is desired.

13 years agoEnsure regen.pl and the scripts that it calls can be run by older perls.
Nicholas Clark [Wed, 22 Sep 2010 12:50:20 +0000 (13:50 +0100)]
Ensure regen.pl and the scripts that it calls can be run by older perls.

As the internal comments state, they may be all that is available, particularly
if trying to port something to an obscure platform. There's not that much that
needs changing to get back to 5.005, or from there to 5.004, but beyond there
is hard work, and really not worth it.

13 years agoIn embed.pl's walk_table, the default filename of '-' was never used.
Nicholas Clark [Wed, 22 Sep 2010 09:49:24 +0000 (10:49 +0100)]
In embed.pl's walk_table, the default filename of '-' was never used.

Remove it, simplifying the argument passing.

13 years agoProgrammatically generate the compatibility macros for "misnamed functions".
Nicholas Clark [Wed, 22 Sep 2010 09:03:13 +0000 (10:03 +0100)]
Programmatically generate the compatibility macros for "misnamed functions".

Add a new flag 'O' in embed.fnc to generate a macro mapping perl_$func() to
$func(). The macro for call_atexit() is far too special to do this way.

13 years agoRemove from warnings.pl various long commented out and dead code.
Nicholas Clark [Wed, 22 Sep 2010 11:05:19 +0000 (12:05 +0100)]
Remove from warnings.pl various long commented out and dead code.

This code was commented out/rendered vestigial in 1998, 2000 and 2002 by
599cee73f2261c5ed3a7d8c7d7e4d69d and 0d658bf5a06395c2.

13 years agoFix misinformation in perldebtut
Florian Ragwitz [Wed, 22 Sep 2010 07:30:25 +0000 (09:30 +0200)]
Fix misinformation in perldebtut

'B' is for removing breakpoints, not 'd' or 'D'. Pointed out by Jerry Huth.

13 years agoWe're going to embed two interpreters, not four
Florian Ragwitz [Tue, 21 Sep 2010 11:29:06 +0000 (13:29 +0200)]
We're going to embed two interpreters, not four

13 years agomake sure perl doesn't touch stat.t between stats
Tony Cook [Wed, 22 Sep 2010 04:28:36 +0000 (14:28 +1000)]
make sure perl doesn't touch stat.t between stats

ebcfa0534 changed stat.t to avoid using TEST as the stat target, since
it is read by other test scripts.  But with the initial stat() in the
BEGIN block perl is still reading the script for compilation, which
will update the access time.  Since the system clock usually didn't
tick another second between the first and second stats, the test
usually succeeded, but occasionally the clock would tick, and the test
would fail.

Moved the stat() out of the BEGIN block to avoid that.

As a check I temporarily added a 2 second sleep after the initial
stat to ensure we didn't have a similar problem to that will
allowed this to pass most of the time.

13 years ago‘criteria was’ -> ‘criteria were’
Father Chrysostomos [Tue, 21 Sep 2010 23:23:11 +0000 (16:23 -0700)]
‘criteria was’ -> ‘criteria were’

13 years agoProgrammatically generate embed.h's *_nocontext exception list in embed.pl.
Nicholas Clark [Tue, 21 Sep 2010 16:06:27 +0000 (17:06 +0100)]
Programmatically generate embed.h's *_nocontext exception list in embed.pl.

Previously the list was hard-coded.

13 years agoIn embed.pl, read embed.fnc into an array, rather than seeking and rereading.
Nicholas Clark [Tue, 21 Sep 2010 15:31:41 +0000 (16:31 +0100)]
In embed.pl, read embed.fnc into an array, rather than seeking and rereading.

13 years agoIn embed.pl, %vfuncs has been unused since PERL_OBJECT was removed in 2001.
Nicholas Clark [Tue, 21 Sep 2010 14:49:53 +0000 (15:49 +0100)]
In embed.pl, %vfuncs has been unused since PERL_OBJECT was removed in 2001.

PERL_OBJECT was removed in commit acfe0abcedaf592f. No point in keeping dead
code.

13 years agoExtUtils::Constant::ProxySubs should use mro_method_changed_in() if available.
Nicholas Clark [Tue, 21 Sep 2010 14:11:17 +0000 (15:11 +0100)]
ExtUtils::Constant::ProxySubs should use mro_method_changed_in() if available.

13 years agoAdd macro_to_ifndef to ExtUtils::Constant::Base, and use it in place of #else
Nicholas Clark [Tue, 21 Sep 2010 13:55:52 +0000 (14:55 +0100)]
Add macro_to_ifndef to ExtUtils::Constant::Base, and use it in place of #else

Previously the code was using the #ifdef generated by macro_to_ifdef(), and
immediately following that with an #else. That was ugly. And longer.

13 years agoTweak ExtUtils::Constant::ProxySubs to use hv_exists_ent().
Nicholas Clark [Tue, 21 Sep 2010 13:27:19 +0000 (14:27 +0100)]
Tweak ExtUtils::Constant::ProxySubs to use hv_exists_ent().

Previously it was using hv_exists(), requiring extra code to unpack the SV and
convert it to the correct string form for the hash API.

13 years agoRemove boilerplate and (un)conditional code from Makefile.PLs in ext
Nicholas Clark [Tue, 21 Sep 2010 13:07:00 +0000 (14:07 +0100)]
Remove boilerplate and (un)conditional code from Makefile.PLs in ext

13 years agoTweak XS::APItest to automatically add all functions to @EXPORT.
Nicholas Clark [Tue, 21 Sep 2010 12:34:12 +0000 (13:34 +0100)]
Tweak XS::APItest to automatically add all functions to @EXPORT.

This saves manually maintaining the export list, which is makework given that
the module is only used by its own tests. As the export now folds in symbols
from subpackages, this will allow refactoring/reordering/rationalisation of
the layout of testing routines in it.

13 years agoEliminate PL_* accessor functions under ithreads.
Nicholas Clark [Thu, 19 Aug 2010 14:54:12 +0000 (15:54 +0100)]
Eliminate PL_* accessor functions under ithreads.

When MULTIPLICITY was first developed, and interpreter state moved into an
interpreter struct, thread and interpreter local PL_* variables were defined
as macros that called accessor functions, returning the address of the value,
outside of the perl core. The intent was to allow members within the
interpreter struct to change size without breaking binary compatibility, so
that bug fixes could be merged to a maintenance branch that necessitated such
a size change.

However, some non-core code defines PERL_CORE, sometimes intentionally to
bypass this mechanism for speed reasons, sometimes for other reasons but with
the inadvertent side effect of bypassing this mechanism. As some of this code
is widespread in production use, the result is that the core *can't* change
the size of members of the interpreter struct, as it will break such modules
compiled against a previous release on that maintenance branch. The upshot
is that this mechanism is redundant, and well-behaved code is penalised by
it. Hence it can and should be removed.

Accessor functions are still needed for globals when PERL_GLOBAL_STRUCT is
defined.

13 years agoClarify a perldelta entry
Father Chrysostomos [Tue, 21 Sep 2010 07:31:58 +0000 (00:31 -0700)]
Clarify a perldelta entry

13 years agoperldelta entries for the last two bug fixes
Father Chrysostomos [Tue, 21 Sep 2010 07:07:21 +0000 (00:07 -0700)]
perldelta entries for the last two bug fixes

13 years agoMention wide character warnings in perl5135delta.pod
Father Chrysostomos [Tue, 21 Sep 2010 06:51:40 +0000 (23:51 -0700)]
Mention wide character warnings in perl5135delta.pod

An oversight: warn and die now produced wide character warnings, as
well as print.

This commit adds them to perl5135delta.pod retroactively, so they will
make their way into perl5140delta.pod.

13 years agoFix pod syntax in perlsub
Father Chrysostomos [Tue, 21 Sep 2010 05:51:39 +0000 (22:51 -0700)]
Fix pod syntax in perlsub

13 years ago[perl #47365] Docs for \$ prototypes
Father Chrysostomos [Tue, 21 Sep 2010 05:29:03 +0000 (22:29 -0700)]
[perl #47365] Docs for \$ prototypes

\$ allows any hash/array element, even if it does not start with a
dollar sign.

13 years agoTest localization of English.pm’s $LIST_SEPARATOR [perl #47107]
Michael G Schwern [Tue, 21 Sep 2010 05:23:48 +0000 (22:23 -0700)]
Test localization of English.pm’s $LIST_SEPARATOR [perl #47107]

13 years agoLet B::Deparse know about the [perl #20444] fix.
Father Chrysostomos [Tue, 21 Sep 2010 05:05:39 +0000 (22:05 -0700)]
Let B::Deparse know about the [perl #20444] fix.

With the previous commit:

$ ./perl -Ilib -MO=Deparse -e'"foo" =~ (1?/foo/:/bar/)'
'foo' =~ /foo/;
-e syntax OK

So the Deparse output no longer matches what perl does. With
this commit:

$ ./perl -Ilib -MO=Deparse -e'"foo" =~ (1?/foo/:/bar/)'
'foo' =~ ($_ =~ /foo/);
-e syntax OK

13 years ago[perl #20444] regex not evaluated in constant ?:
Father Chrysostomos [Tue, 21 Sep 2010 05:05:34 +0000 (22:05 -0700)]
[perl #20444] regex not evaluated in constant ?:

  $text =~ ( 1 ? /phoo/ : /bear/)

used to be constant-folded to

  $text =~ /phoo/

This patch solves the problem by marking match and subst ops as
OPf_SPECIAL during constant folding, so the =~ operator can tell not
to take possession of it.

13 years ago[perl #19078] wrong match order inside replacement
Father Chrysostomos [Tue, 21 Sep 2010 04:24:02 +0000 (21:24 -0700)]
[perl #19078] wrong match order inside replacement

$ perl -le '$_="CCCGGG"; s!.!@a{print("[$&]"),/./}!g'
[C]
[C]
[C]
[C]
[C]
[C]

What’s happening is that the s/// does not reset PL_curpm for each
iteration, because it doesn’t usually have to.

The RHS’s scoping takes care of it most of the time. This happens with
the /e modifier and with @{...}.

In this example, though, we have a subscript, not a block. This sub-
script is in the same scope as the s/// itself.

The assumption that the substitution operator will never have to reset
PL_curpm itself appears to be incorrect. This fixes it.

13 years agocompare stat results on a file that isn't touched elsewhere
Tony Cook [Tue, 21 Sep 2010 04:03:37 +0000 (14:03 +1000)]
compare stat results on a file that isn't touched elsewhere

lib/File/stat.t compares two stat calls on t/TEST against each
other, but other tests read t/TEST, modifying its access time,
causing rare random failures in stat.t in parallel tests.

13 years agoDon't process .patch in Configure
Jerry D. Hedden [Mon, 20 Sep 2010 17:42:06 +0000 (13:42 -0400)]
Don't process .patch in Configure

The format of the .patch file is no longer an integer change
number, and generates an error when processed by Configure.
As .patch is now handled by make_patchnum.pl, the attached
patch removes processing of .patch from Configure.

13 years agoRestore Unicode-Normalize .gitignore to ignore build products
Tony Cook [Tue, 21 Sep 2010 00:02:33 +0000 (10:02 +1000)]
Restore Unicode-Normalize .gitignore to ignore build products

13 years agoAdd two (SV *) casts to placate C++.
Tony Cook [Mon, 20 Sep 2010 23:53:42 +0000 (09:53 +1000)]
Add two (SV *) casts to placate C++.

13 years agoUpdate perldelta.pod with recent module updates
Chris 'BinGOs' Williams [Mon, 20 Sep 2010 23:26:53 +0000 (00:26 +0100)]
Update perldelta.pod with recent module updates

13 years agoUpdate Unicode-Normalize to CPAN version 1.07
Chris 'BinGOs' Williams [Mon, 20 Sep 2010 23:24:48 +0000 (00:24 +0100)]
Update Unicode-Normalize to CPAN version 1.07

  [DELTA]

  1.07  Mon Sep 20 20:20:02 2010
    - doc: about perl 5.12.x and Unicode 5.2.0
    - test: prototype of normalize_partial() and cousins in proto.t.

13 years agoAdd missing bug numbers
Father Chrysostomos [Mon, 20 Sep 2010 22:44:55 +0000 (15:44 -0700)]
Add missing bug numbers

13 years agocall defout/stderr destructors last
David Mitchell [Mon, 20 Sep 2010 21:14:23 +0000 (22:14 +0100)]
call defout/stderr destructors last

When calling the destructors for IO objects embedded in arena GVs,
process PL_defoutgv and PL_stderrgv last. Yes, the test suite
expects STDOUT to still work at this point. Indeed, one test in ref.t
calls print from STDOUT's destructor (which is why pp_print needed a
slight tweak to handle a null GV properly).

13 years agorun named IO destructors later
David Mitchell [Mon, 20 Sep 2010 12:43:33 +0000 (13:43 +0100)]
run named IO destructors later

split do_clean_named_objs() into two functions; the first skips the IO
slot, and the second, do_clean_named_io_objs(), only processes the IO slot.
This means that the destructors for IO objects are run later than for
other named objects, so the latter will still have access to all their IO.

This is a fix for 57ef47cc7bcd1b57927d5010f363ccaa10f1d990,
which changed do_clean_named_objs() to zap the slots of a GV rather
than just decrementing the GV's ref count. This change ensures
referential integrity, but means that GVs with a reference > 1 will still
have their slots zapped. In particular, it means that PL_defoutgv no
longer gets delayed zapping. However, this has always been a problem
for any other file handles; depending on the order of GV zapping, a file
handle could be freed before a destructor gets called that might use it.

So this is a general fix.

13 years ago[perl #77930] cx_stack reallocation during sort
Father Chrysostomos [Mon, 20 Sep 2010 08:23:35 +0000 (10:23 +0200)]
[perl #77930] cx_stack reallocation during sort

Reset cx in pp_sort before POPSUB, as the pointer may no
longer be valid.

13 years agoporting/manifest.t fail gracefully under !git
David Mitchell [Mon, 20 Sep 2010 08:15:56 +0000 (09:15 +0100)]
porting/manifest.t fail gracefully under !git

This test was producing spurious output to stderr when not under
git control (e.g. a release tarball):

fatal: Not a git repository (or any parent up to mount parent )
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

13 years agoUpgrade PathTools to 3.33
Steffen Mueller [Mon, 20 Sep 2010 07:56:10 +0000 (09:56 +0200)]
Upgrade PathTools to 3.33

This is just a version bump to make the versions in blead and CPAN
match.

13 years agoDon’t use PL_op without checking it first.
Father Chrysostomos [Mon, 20 Sep 2010 07:44:15 +0000 (09:44 +0200)]
Don’t use PL_op without checking it first.

13 years agofix typo in newSVpvn_flags() docs
David Mitchell [Sun, 19 Sep 2010 12:33:26 +0000 (13:33 +0100)]
fix typo in newSVpvn_flags() docs

13 years agofix PL_psig_pend freeing
David Mitchell [Sun, 19 Sep 2010 12:11:54 +0000 (13:11 +0100)]
fix PL_psig_pend freeing

Commit 31c91b4357905486e81f901ad079da5735bdb7ba added a block of code
to free PL_psig_pend in a signal-safe way, but omitted to remove the
original unsafe freeing code above it. Removed with this commit.

13 years ago[perl #40388] perl_destruct() leaks PL_main_cv
David Mitchell [Sun, 19 Sep 2010 11:49:07 +0000 (12:49 +0100)]
[perl #40388] perl_destruct() leaks PL_main_cv

Well yes, it does, kinda; but it's harmless. Add a comment to that effect.

13 years ago[perl #40389] perl_destruct() leaks PL_defstash
David Mitchell [Sun, 19 Sep 2010 11:33:04 +0000 (12:33 +0100)]
[perl #40389] perl_destruct() leaks PL_defstash

With PERL_DESTRUCT_LEVEL >= 1, PL_defstash is explicitly freed,
but doesn't actually get freed at that point due to a reference loop
between %:: and *::. Break that loop to ensure that PL_defstash gets freed
at that point. Actually, its not as serious as it sounds, as it would get
freed a bit later anyway by sv_clean_all(), but this new way has these
benefits:

* it gets freed where you expect it to be
* it gets freed cleanly, rather than by the more brutal sv_clean_all()
  (which can leave dangling pointers to freed SVs)
* since its freed while *not* under the influence of
  PL_in_clean_all = TRUE, it's more likely to flag up bugs related to
  double-freeing etc. Indeed, the two previous commits to this are a
  result of that.

13 years agoPL_ofsgv is ref counted, so inc when duping
David Mitchell [Sun, 19 Sep 2010 11:14:45 +0000 (12:14 +0100)]
PL_ofsgv is ref counted, so inc when duping

13 years agostop do_clean_named_objs() leaving dangling refs
David Mitchell [Sat, 18 Sep 2010 22:01:54 +0000 (23:01 +0100)]
stop do_clean_named_objs() leaving dangling refs

Currently perl does 3 major scans of the SV arenas, so the action of
perl_destroy() is a bit like this:

    for (all arena SVs) {
if (its a ref to an object)
    undef the ref (and thus probably free the object)
    }
    for (all arena SVs) {
if (it's a typeglob and at least one of its slots holds an object) {
   set SVf_BREAK on the gv
   SvREFCNT_dec(gv)
}
    }
    return if $PERL_DESTRUCT_LEVEL < 1;
    PL_in_clean_all = 1

    for (all arena SVs) {
       set SVf_BREAK on the sv
       SvREFCNT_dec(sv)
    }

The second scan is problematic, in that by randomly zapping GVs, it can
leave dangling pointers to freed GVs. This is while perl-level destructors
may still be called, meaning perl users can see corrupted state.
Note also that at this point PL_in_clean_all hasn't been set, so sv_free()
may put out 'Attempt to free unreferenced scalar' warnings.

This commit fixes this by only freeing the affected slots of the GV,
rather than freeing the GV itself. Thus makes it more like the first pass,
which undefs RVs, and ensures no dangling refs.

13 years agoAdd (?^...) regex construct
Karl Williamson [Thu, 19 Aug 2010 05:48:16 +0000 (23:48 -0600)]
Add (?^...) regex construct

This adds (?^...) to signify to use the default regex modifiers for the
cluster or embedded pattern-match modifier change.  The major purpose of
this is to simplify regex stringification, so that "^" is output in
place of "-xism".  As a result, the stringification will not change in
the future when new regex modifiers are added, so tests, etc. that rely
on a particular stringification will have to change now, but never
again.

Code that needs to work properly with both old- and new-style regexes
can use something like the following:

    # Accept both old and new-style stringification
    my $modifiers = (qr/foobar/ =~ /\Q(?^/) ? '^' : '-xism';

This construct is Ben Morrow's idea.

13 years agoregcomp.c: fix an improper indent
Karl Williamson [Thu, 19 Aug 2010 04:53:35 +0000 (22:53 -0600)]
regcomp.c: fix an improper indent

13 years agoUpgade NEXT from version 0.64 to 0.65
Florian Ragwitz [Mon, 20 Sep 2010 02:03:12 +0000 (04:03 +0200)]
Upgade NEXT from version 0.64 to 0.65

We can now set PERL_CORE again when running its tests.

13 years agoUpgrade PathTools from version 3.31_02 to 3.32
Florian Ragwitz [Mon, 20 Sep 2010 00:05:29 +0000 (02:05 +0200)]
Upgrade PathTools from version 3.31_02 to 3.32

13 years agoModule::CoreList 2.39 is on CPAN now
Florian Ragwitz [Sun, 19 Sep 2010 23:27:54 +0000 (01:27 +0200)]
Module::CoreList 2.39 is on CPAN now

13 years agoRemove unnecessary XS-APItest test boilerplate
Florian Ragwitz [Sun, 19 Sep 2010 19:03:34 +0000 (21:03 +0200)]
Remove unnecessary XS-APItest test boilerplate

If perl was configured without XS/APItest as an extension, make test and make
test_harness won't even run the tests anyway. Also, XS-APItest only lives in the
core, so it's only ever going to be tested there, making conditional tests
depending on $] unnecessary.

13 years agoAdd tests for PL_peepp/PL_rpeepp
Florian Ragwitz [Mon, 13 Sep 2010 20:46:44 +0000 (22:46 +0200)]
Add tests for PL_peepp/PL_rpeepp

13 years agoUpdate release manager's guide regarding perldelta
Steve Hay [Sun, 19 Sep 2010 22:37:18 +0000 (23:37 +0100)]
Update release manager's guide regarding perldelta

13 years agoPrepare perldelta for Perl 5.13.6
Steve Hay [Sun, 19 Sep 2010 22:34:08 +0000 (23:34 +0100)]
Prepare perldelta for Perl 5.13.6

13 years agoRemoved the superfluous META.yml from Module-CoreList
Chris 'BinGOs' Williams [Sun, 19 Sep 2010 22:09:40 +0000 (23:09 +0100)]
Removed the superfluous META.yml from Module-CoreList

13 years agoUpdate Porting/epigraphs.pod for Perl 5.13.5
Steve Hay [Sun, 19 Sep 2010 21:55:51 +0000 (22:55 +0100)]
Update Porting/epigraphs.pod for Perl 5.13.5

13 years agoRecord another known problem in perldelta v5.13.5
Steve Hay [Sun, 19 Sep 2010 20:01:49 +0000 (21:01 +0100)]
Record another known problem in perldelta

Testers on IRC have also discovered that the upgrade to
ExtUtils-MakeMaker-6.57_05 has resulted in some Module-Install tests
failing

13 years agoRecord a known problem in perldelta
Steve Hay [Sun, 19 Sep 2010 17:56:26 +0000 (18:56 +0100)]
Record a known problem in perldelta

Testers on IRC have discovered that the upgrade to Encode-2.40 has resulted
in some libwww-perl tests failing

13 years agoDon't use wildcards in Porting/exec-bit.txt
Steve Hay [Sun, 19 Sep 2010 17:25:25 +0000 (18:25 +0100)]
Don't use wildcards in Porting/exec-bit.txt

The *.SH wildcard wrongly matched *.sh files on Windows's case-insensitive
filesystem, leading to an exec bit getting set where it shouldn't have been

Thanks to rafl and vincent for spotting the problem and the cause

13 years agoFinal update to perldelta.pod for Perl 5.13.5
Steve Hay [Sun, 19 Sep 2010 16:04:39 +0000 (17:04 +0100)]
Final update to perldelta.pod for Perl 5.13.5

13 years agoRecord Perl 5.13.5 in perlhist
Steve Hay [Sun, 19 Sep 2010 15:41:18 +0000 (16:41 +0100)]
Record Perl 5.13.5 in perlhist

13 years agoUpdate Module::CoreList for Perl 5.13.5
Steve Hay [Sun, 19 Sep 2010 15:29:08 +0000 (16:29 +0100)]
Update Module::CoreList for Perl 5.13.5

13 years agoUpdate Changes for 5.13.5
Steve Hay [Sun, 19 Sep 2010 14:31:48 +0000 (15:31 +0100)]
Update Changes for 5.13.5

13 years agoBump version to 5.13.5
Steve Hay [Sun, 19 Sep 2010 14:21:29 +0000 (15:21 +0100)]
Bump version to 5.13.5

13 years agoUpdate perldelta for 5.13.5
Steve Hay [Sun, 19 Sep 2010 12:31:11 +0000 (13:31 +0100)]
Update perldelta for 5.13.5

Hopefully the last-but-one update

13 years agoBump VERSIONs in XS-APItest and XS-APItest-KeywordRPN
Steve Hay [Sun, 19 Sep 2010 12:29:35 +0000 (13:29 +0100)]
Bump VERSIONs in XS-APItest and XS-APItest-KeywordRPN

Not strictly necessary for these modules since they don't get installed
anyway, but their XS files have been changed since 5.13.4

13 years agoBump VERSION in PerlIO-scalar
Steve Hay [Sun, 19 Sep 2010 12:28:26 +0000 (13:28 +0100)]
Bump VERSION in PerlIO-scalar

The XS file has been changed since 5.13.4

13 years agoBump VERSION in threads-shared
Steve Hay [Sun, 19 Sep 2010 12:28:09 +0000 (13:28 +0100)]
Bump VERSION in threads-shared

The XS file has been changed since 5.13.4

13 years agoUpdate perldelta for 5.13.5 tomorrow (err, later today)
Steve Hay [Sun, 19 Sep 2010 01:20:27 +0000 (02:20 +0100)]
Update perldelta for 5.13.5 tomorrow (err, later today)

Not finished yet, but nearly there already thanks to the efforts of rafl
over the last month :-)