This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
10 years agotoke.c: Remove commented-out code
Father Chrysostomos [Fri, 23 Aug 2013 05:35:28 +0000 (22:35 -0700)]
toke.c: Remove commented-out code

This ‘if(){’ has been commented out since it was added in 5db068806.
Presumably the intent was to make the special mad code specific to
PL_madskills at some point and have mad builds running without
PL_madskills follow the same code as regular builds (the *s = '\0' and
PL_bufend assignments).

Since then, though, the standard code has changed to match the mad
code.  The next commit will merge them.

10 years agoFix typo in bf1b738b; another line num bug
Father Chrysostomos [Fri, 23 Aug 2013 05:58:37 +0000 (22:58 -0700)]
Fix typo in bf1b738b; another line num bug

This affects only mad builds.  The line number after

nullary_keyword_such_as_time
;

was off by one.

10 years ago[perl #119429] restore XS module building on WinCE
Tony Cook [Fri, 23 Aug 2013 06:32:08 +0000 (16:32 +1000)]
[perl #119429] restore XS module building on WinCE

The Makefile.ce PV change was split off into an update of
bump-perl-version

10 years agorestore XS module building for WinCE
Daniel Dragan [Thu, 22 Aug 2013 18:11:17 +0000 (14:11 -0400)]
restore XS module building for WinCE

configpm
- when debugging configpm, Config.pm is already loaded, so the alternate
  Config.pm for CE isn't loaded, warn about the problem and delete the
  native Config.pm to allow the cross Config.pm to be loaded

win32/Makefile.cd
- better build product cleanup, copy from the win32 makefile
- disable a bunch of module that dont/dont yet build on CE
- debugging configpm required a shortcut to make it easier to run in
  isolation
- fix the defines that wind up in the cross Config.pm
- add -GS- to disable the MS Security Cookie feature on MSVC for ARM >=14
  compilers, this stops a .lib linking error, security cookie overhead
  isnt needed for a very space limited device

sdsdkenv.bat is the file I use to set env vars to compile for WM since
starting in SmartDevices SDK, there is no equivelent of vcvarsall.bat
for makefile building, there was a vcvarsall.bat equivelent in EVC4 tho

MSVC for non Intel CPUs sometimes isn't named cl.exe, fix config_sh.PL to
deal with it

how to compile CE Perl, some steps involving celib and MS SDKs not included
and 2 patches to CPAN modules, Socket and MakeMaker, are not in this commit
but they are required to build CE Perl

-in a Win32 x86/x64 command prompt do a "nmake all" to make a Desktop Perl
-then in a WinCE build env command prompt do a "nmake -f makefile.ce all"
-/xlib will have all your XS DLLs and PM files, /win32/$(MACHINE) will
 have perl519.dll and perl.exe

Tony Cook: update MANIFEST

10 years ago[perl #119429] bump-perl-version now updates Makefile.ce
Tony Cook [Fri, 23 Aug 2013 05:50:54 +0000 (15:50 +1000)]
[perl #119429] bump-perl-version now updates Makefile.ce

10 years ago[perl #118931] Fix line number bug
Father Chrysostomos [Thu, 22 Aug 2013 17:01:58 +0000 (10:01 -0700)]
[perl #118931] Fix line number bug

Commit 2179133 (in 5.19.2) introduced this line number bug when it
modified the parser to look past newlines when searching for => after
a keyword:

$ perl5.19.3
1 unless
1;
warn;
^D
Warning: something's wrong at - line 2.

The warning should say line 3, not 2.

Before 2179133, the parser’s line-reading algorithm work strictly in
two modes:  From a file, one line would be read into PL_linestr at a
time.  In a string eval, PL_linestr would contain all the code.

To be able to look past a newline to find => after a keyword, the
parser’s former mode had to be adjusted:

• It has to be possible to append more lines of input to the buffer
  without incrementing the line number.
• When reading from a filehandle, the lexer should not assume when it
  sees "\n" that it has reached the end of the buffer.

Commit 2179133 did those two things.

It did not, however, make the lexer increment the line number when
encountering a newline in the middle of it (when reading from a han-
dle; string eval follows a different code path).

Fixing it to do that requires that lex_start be adjusted, too.  When
lexing begins, PL_linestr is set to "\n;" when there is no string to
eval.  This worked for file handles because the lexer, on seeing the
\n, would ignore the semicolon.

Now that it no longer ignores the semicolon, it will end up incre-
mented the line number erroneously at the outset, so set the buffer
to just "\n" instead.

In one place (skipspace2), the mad-specific code was setting PL_bufptr
to point at its previous location after calling skipspace.  skipspace
sets it to point after the newline to prevent incline() from being
called a second time for the same newline.  But this is exactly what
happens if skipspace2 resets PL_bufptr.  The callers of skipspace2
apparently don’t depend on this, so we can remove it.

10 years agoperlexperiment: add ticket link for autoderef
Ricardo Signes [Fri, 23 Aug 2013 01:49:42 +0000 (21:49 -0400)]
perlexperiment: add ticket link for autoderef

10 years agoperldelta for 5ceca735, 6358232b
Tony Cook [Fri, 23 Aug 2013 01:26:58 +0000 (11:26 +1000)]
perldelta for 5ceca7356358232b

10 years agoAdd bint() method for rounding towards zero.
Peter John Acklam [Thu, 15 Aug 2013 04:13:17 +0000 (14:13 +1000)]
Add bint() method for rounding towards zero.

Since bfloor() and bceil() exist, add bint() for completeness.  As with
bfloor() and bceil(), bint() does not change the object class. This is
unlike as_int(), which converts the object to a Math::BigInt.

Rename bint() subroutine in the example section to bigint() to avoid
confusion with the new method bint().

Add tests for bint().

Add a little more precise documentation of bfloor() and bceil().

10 years agobump versions for Math::BigInt and Math::BigFloat
Tony Cook [Fri, 23 Aug 2013 00:58:43 +0000 (10:58 +1000)]
bump versions for Math::BigInt and Math::BigFloat

10 years agoClean up POD for Math::BigInt and Math::BigFloat
Tony Cook [Fri, 23 Aug 2013 00:34:09 +0000 (10:34 +1000)]
Clean up POD for Math::BigInt and Math::BigFloat

Based on work done by Peter John Acklam, differences from his original
patch:

- links to items (which have been corrected by others) have been retained

- unnecessary conversion of < and > to E<lt> and E<gt> has been skipped.

- =over N has been converted to =over

- adjusted white-space in many places to avoid hitting column 80 in
  perldoc for verbatim text

10 years agodetect Carp/Carp::Heavy version mismatch
Zefram [Thu, 22 Aug 2013 21:57:01 +0000 (22:57 +0100)]
detect Carp/Carp::Heavy version mismatch

[rt.cpan.org #79649]  If an old Carp, requiring old-style Carp::Heavy
that provides subroutines, gets a newer stub-style Carp::Heavy, due to
@INC having changed, the resulting error messages were not awesome.

10 years agoavoid more vivification in Carp
Zefram [Thu, 22 Aug 2013 21:29:08 +0000 (22:29 +0100)]
avoid more vivification in Carp

Avoid vivifying the overload::StrVal subroutine, its glob, or its stash.
This is done in the same way as the existing avoidance of vivification of
utf8::is_utf8 and utf8::downgrade.  However, the check has to be made at
runtime, whereas the utf8-related ones are checked at load time, because
the utf8 ones are built into the perl core (only absent pre perl 5.8)
but overload is a separate module that can be loaded later.

10 years agoSkip dynaloader test on Bitrig like we do for OpenBSD
Chris 'BinGOs' Williams [Thu, 22 Aug 2013 18:04:47 +0000 (19:04 +0100)]
Skip dynaloader test on Bitrig like we do for OpenBSD

10 years agoUpdate perldelta for Bitrig platform support
Chris 'BinGOs' Williams [Thu, 22 Aug 2013 16:08:33 +0000 (17:08 +0100)]
Update perldelta for Bitrig platform support

10 years agoAdd Marco Peereboom and Owain G. Ainsworth to AUTHORS
Chris 'BinGOs' Williams [Thu, 22 Aug 2013 15:15:14 +0000 (16:15 +0100)]
Add Marco Peereboom and Owain G. Ainsworth to AUTHORS

10 years agoApply bitrig change to lib/locale.t too
Chris 'BinGOs' Williams [Thu, 22 Aug 2013 15:11:29 +0000 (16:11 +0100)]
Apply bitrig change to lib/locale.t too

This change appears to have entered the bitrig source tree via
openbsd source merge.

10 years agoTweak the perl build some
Owain G. Ainsworth [Thu, 22 Aug 2013 14:55:02 +0000 (15:55 +0100)]
Tweak the perl build some

Fix the cross makefile.  makefile.SH treat us like openbsd.

hints/bitrig.sh: remove all version number detection goop. this is for
openbsd versions that are currently *higher* then the bitrig version
number, so avoid foot shooting by throwing it out.

Signed-off-by: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
10 years agoAdd support for Bitrig BSD
Marco Peereboom [Thu, 22 Aug 2013 14:41:42 +0000 (15:41 +0100)]
Add support for Bitrig BSD

Signed-off-by: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
10 years agoFix Peek.t failure under -DPERL_NO_COW
Father Chrysostomos [Thu, 22 Aug 2013 15:32:11 +0000 (08:32 -0700)]
Fix Peek.t failure under -DPERL_NO_COW

The code for stripping out COW_REFCNT needs to be more lenient
and allow things like COW_REFCNT = [12].

10 years ago[perl #118747] Allow in-place s///g when !!PL_sawampersand
Father Chrysostomos [Thu, 22 Aug 2013 04:59:20 +0000 (21:59 -0700)]
[perl #118747] Allow in-place s///g when !!PL_sawampersand

This is the more correct version of 1555b325 which was reverted
by 6200d5a0e.

In pp_subst, there is an initial pattern match against the target
string, followed by logic to determine which of several code paths
will handle the rest of the substitution, depending on which shortcuts
can be taken.

There is one path specifically for doing a global sort (/g) and modi-
fying the target in place.  This code was skipped if the target was a
copy-on-write scalar or if the pre-match copy was enabled.  The pre-
match copy is always enabled now, so this code is unreachable.

In-place substitution stringifies the rhs at the outset, just after
the first regexp match, but before any substitution.  Then it uses
that string buffer, expecting it not to change.

That clearly cannot work with s/a/$&/g; it will also cause erratic
behaviour in the case of regexp code blocks (which will see the
string being modified, which doesn not happen with unoptimised subst).
That’s why the in-place optimisation has to be skipped when the
REXEC_COPY_STR flag is set.

But we can tweak that logic:

• As long as the rhs is not a magical var, its contents are not going
  to change from one iteration to the next.
• If there are no code blocks, nothing will see the string during the
  substitution.

So this commit adds logic to check those things, enabling this opti-
misation where possible.

Skipping this optimisation for the pre-match copy was originally added
in commit 5d5aaa5e7.

10 years agoRemove null check from mg.c:magic_getvec
Father Chrysostomos [Fri, 26 Jul 2013 13:25:36 +0000 (06:25 -0700)]
Remove null check from mg.c:magic_getvec

lsv can never be null here.  This null check has been here since
vec’s get-magic was added in ae389c8a or 6ff81951f7.

10 years agoFix assertion failure with $#a=\1
Father Chrysostomos [Fri, 26 Jul 2013 06:09:58 +0000 (23:09 -0700)]
Fix assertion failure with $#a=\1

If the array has been freed and a reference is then assigned to
the arylen scalar and then get-magic is called on that scalar,
Perl_magic_getarylen misbehaves.  SvOK_off is not sufficient if
arbitrary values can be assigned by Perl code.  Globs, refs and
regexps (among others) need special handling, which sv_setsv
knows how to do.

10 years agoSkip the perldoc test if 'man' is missing
Niko Tyni [Tue, 6 Aug 2013 13:57:00 +0000 (16:57 +0300)]
Skip the perldoc test if 'man' is missing

This fixes a test failure in minimal build environments without
a 'man' command.

10 years agoUpgrade Perl::OSType from 1.003 to 1.004
Steve Hay [Thu, 22 Aug 2013 07:41:38 +0000 (08:41 +0100)]
Upgrade Perl::OSType from 1.003 to 1.004

10 years agoUpgrade Module-Metadata from 1.000014 to 1.000016
Steve Hay [Thu, 22 Aug 2013 07:38:20 +0000 (08:38 +0100)]
Upgrade Module-Metadata from 1.000014 to 1.000016

10 years agoRevert "[perl #118747] Allow in-place s///g when !!PL_sawampersand"
Father Chrysostomos [Thu, 22 Aug 2013 08:15:03 +0000 (01:15 -0700)]
Revert "[perl #118747] Allow in-place s///g when !!PL_sawampersand"

This reverts commit 1555b325296e46f7b95bee03fe856cec348b0d57.

This is causing test failures (not on my machine), and I do not have
time right now to track them all down.

10 years agopp_hot.c:pp_subst: Move comment
Father Chrysostomos [Thu, 22 Aug 2013 05:03:49 +0000 (22:03 -0700)]
pp_hot.c:pp_subst: Move comment

Perl 5 has always had the ‘don't match same null twice’ comment
in pp_subst.  Originally it was a parenthetical note right below
the s == m.

71be2cbc removed the parentheses.  Commit f722798be moved it further
away from s == m.  Now what it refers to is far from clear.

10 years ago[perl #118747] Allow in-place s///g when !!PL_sawampersand
Father Chrysostomos [Thu, 22 Aug 2013 04:59:20 +0000 (21:59 -0700)]
[perl #118747] Allow in-place s///g when !!PL_sawampersand

In pp_subst, there is an initial pattern match against the target
string, followed by logic to determine which of several code paths
will handle the rest of the substitution, depending on which shortcuts
can be taken.

There is one path specifically for doing a global sort (/g) and modi-
fying the target in place.  This code was skipped if the target was a
copy-on-write scalar or if the pre-match copy was enabled.  The pre-
match copy is always enabled now, so this code is unreachable.

There does not appear to be any reason why this path must be skipped
in the presence of the pre-match copy.  The string gets copied by the
initial regexp match and $& and friends point there afterwards.

This skip was added in commit 5d5aaa5e7 (a jumbo patch, so good luck
figuring it out).  This commit removes the skip, and all tests pass.

This, of course, only affects those cases where copy-on-write does
not kick in; for instance, when the string’s length is one less than
its buffer:

$  ./perl -Ilib -e 'use Devel::Peek; $x = " "; $x .= " "x22; Dump $x; $x =~ s/ /b/g; Dump $x'
SV = PV(0x7ffb0b807098) at 0x7ffb0b82eed8
  REFCNT = 1
  FLAGS = (POK,pPOK)
  PV = 0x7ffb0b4066b8 "                       "\0
  CUR = 23
  LEN = 24
SV = PV(0x7ffb0b807098) at 0x7ffb0b82eed8
  REFCNT = 1
  FLAGS = (POK,pPOK)
  PV = 0x7ffb0b4066b8 "bbbbbbbbbbbbbbbbbbbbbbb"\0
  CUR = 23
  LEN = 24

10 years agoMath-BigInt-FastCalc: Swap out base for parent (bowtie)
kevin dawson [Wed, 21 Aug 2013 14:22:20 +0000 (15:22 +0100)]
Math-BigInt-FastCalc: Swap out base for parent (bowtie)

For: RT #119405

10 years agoLocale-Maketext: Swap out base for parent (bowtie)
kevin dawson [Wed, 21 Aug 2013 12:23:59 +0000 (13:23 +0100)]
Locale-Maketext: Swap out base for parent (bowtie)

For: RT #119403

10 years agoAttribute-Handlers: Swap out base for parent in test files.
kevin dawson [Mon, 19 Aug 2013 15:57:41 +0000 (16:57 +0100)]
Attribute-Handlers: Swap out base for parent in test files.

Committer's note: Add dist/Attribute-Handlers/demo/MyClass.pm to list of
files whose $VERSION numbers do not have to be incremented when modified.
Since this file is found in a 'demo/' directory, it does not have to be
treated as if it were a real Perl library which happens to be shipping
with core.

For: RT #119365

10 years agoconsistent POD itemisation markup
Zefram [Wed, 21 Aug 2013 22:53:13 +0000 (23:53 +0100)]
consistent POD itemisation markup

10 years agoavoid Unicode warnings in Carp
Zefram [Wed, 21 Aug 2013 22:43:20 +0000 (23:43 +0100)]
avoid Unicode warnings in Carp

Only affects operation on old Perl versions.  Some special-case hackery
required for compatibility with old warnings.pm that eagerly loads Carp.

10 years agoRMG: Fix some verbatim lines over 79 columns
Karl Williamson [Wed, 21 Aug 2013 21:33:52 +0000 (15:33 -0600)]
RMG: Fix some verbatim lines over 79 columns

10 years agoCorrect spelling of LC_MESSAGES
Niko Tyni [Wed, 21 Aug 2013 20:38:29 +0000 (14:38 -0600)]
Correct spelling of LC_MESSAGES

10 years agoSkip tests for dl_unload_file() when built with -DPERL_GLOBAL_STRUCT_PRIVATE
Nicholas Clark [Wed, 21 Aug 2013 19:05:51 +0000 (21:05 +0200)]
Skip tests for dl_unload_file() when built with -DPERL_GLOBAL_STRUCT_PRIVATE

Building with -DPERL_GLOBAL_STRUCT_PRIVATE uses alternative implementations
of Perl_my_cxt_init() and Perl_my_cxt_index() which store the pointer to the
extension name. For a dynamically loaded shared object this is a pointer to
memory which will be released if that shared object is unloaded, meaning that
any *other* module which calls Perl_my_cxt_index() will likely attempt a read
of unmapped memory.

10 years agoWhitespace changes to DynaLoader.t, as part of adding a TODO: block.
Nicholas Clark [Wed, 21 Aug 2013 18:59:28 +0000 (20:59 +0200)]
Whitespace changes to DynaLoader.t, as part of adding a TODO: block.

10 years agoDocument that DynaLoader::dl_unload_file() is not called at exit by default.
Nicholas Clark [Wed, 21 Aug 2013 18:51:15 +0000 (20:51 +0200)]
Document that DynaLoader::dl_unload_file() is not called at exit by default.

DynaLoader::dl_unload_file() is only called automatically to unload all
loaded shared objects if the perl interpreter was built with the C macro
DL_UNLOAD_ALL_AT_EXIT defined. The documentation has been incorrectly
stating that it is always called since dl_unload_file() was added in v5.6.0

When dl_unload_file() was first added by commit abb9e9dca5a5f121 (March 1st,
2000), it was always called at exit, if available. It was made conditional on
DL_UNLOAD_ALL_AT_EXIT being defined by commit 23d2500b2b45b1be (March 20th,
2000), but the documentation was never updated to reflect this. v5.6.0 was
release on March 22nd, 2000.

10 years agoUpdate RMG to fill in steps on preparing M::CL for the next blead release
Steve Hay [Wed, 21 Aug 2013 13:09:55 +0000 (14:09 +0100)]
Update RMG to fill in steps on preparing M::CL for the next blead release

There is one XXX item here: Porting/corelist.pl doesn't update
dist/Module-CoreList/lib/Module/CoreList/Utils.pm.

10 years agoPrepare Module::CoreList for 5.19.4 and bump its $VERSION
Steve Hay [Wed, 21 Aug 2013 12:29:01 +0000 (13:29 +0100)]
Prepare Module::CoreList for 5.19.4 and bump its $VERSION

10 years agoModule::CoreList 2.97 is now on CPAN
Steve Hay [Wed, 21 Aug 2013 11:39:09 +0000 (12:39 +0100)]
Module::CoreList 2.97 is now on CPAN

10 years ago[perl #118691] Allow defelem magic with neg indices
Father Chrysostomos [Wed, 17 Jul 2013 05:56:44 +0000 (22:56 -0700)]
[perl #118691] Allow defelem magic with neg indices

When a nonexistent array element is passed to a subroutine, a special
‘deferred element’ scalar (implemented using something called defelem
magic) is passed to the subroutine instead, which delegates to the
array element.  This allows some_benign_function($array[$nonexistent])
to avoid autovivifying unnecessarily.

Whether this magic would be triggered was based on whether the element
was within the range 0..$#array.  Since arrays can contain nonexistent
elements before $#array, this logic is incorrect.  It also makes sense
to allow $array[$neg] where the negative number points before the
beginning of the array to create a deferred element and only croak if
it is assigned to.

This commit fixes the logic for when deferred elements are created
and implements these deferred negative elements.

Since we have to be able to store negative values in xlv_targoff, it
is convenient to make it a union (with two types--signed and unsigned)
and use LvSTARGOFF for defelem array indices.

10 years agoperldelta for 710639c2
Tony Cook [Wed, 21 Aug 2013 05:37:44 +0000 (15:37 +1000)]
perldelta for 710639c2

10 years ago[perl #113054] add tests for find2perl and fix ? wildcard handling
Tony Cook [Wed, 21 Aug 2013 05:30:56 +0000 (15:30 +1000)]
[perl #113054] add tests for find2perl and fix ? wildcard handling

10 years agoarray.t: Tests for #7508 and #109726
Father Chrysostomos [Wed, 21 Aug 2013 05:26:34 +0000 (22:26 -0700)]
array.t: Tests for #7508 and #109726

10 years ago[perl #113054] find2perl mistranslates fileglob ? to regex .?
Tony Cook [Wed, 14 Aug 2013 02:17:31 +0000 (12:17 +1000)]
[perl #113054] find2perl mistranslates fileglob ? to regex .?

fix and un-TODO the test

10 years ago[perl #113054] test find2perl, with a TODO for ? glob handling
Tony Cook [Wed, 14 Aug 2013 02:15:40 +0000 (12:15 +1000)]
[perl #113054] test find2perl, with a TODO for ? glob handling

10 years agoAlphabetise AUTHORS
Father Chrysostomos [Wed, 21 Aug 2013 03:39:58 +0000 (20:39 -0700)]
Alphabetise AUTHORS

I know, ‘Whose alphabetisation?’

10 years agoIncrease $Devel::Peek::VERSION to 1.14
Father Chrysostomos [Wed, 21 Aug 2013 03:39:06 +0000 (20:39 -0700)]
Increase $Devel::Peek::VERSION to 1.14

10 years agoIncrease $IPC::Open3::VERSION to 1.16
Father Chrysostomos [Wed, 21 Aug 2013 03:38:47 +0000 (20:38 -0700)]
Increase $IPC::Open3::VERSION to 1.16

10 years agoIncrease $Storable::VERSION to 2.47
Father Chrysostomos [Wed, 21 Aug 2013 03:38:08 +0000 (20:38 -0700)]
Increase $Storable::VERSION to 2.47

10 years ago[perl #7508] Use NULL for nonexistent array elems
Father Chrysostomos [Tue, 2 Jul 2013 20:07:45 +0000 (13:07 -0700)]
[perl #7508] Use NULL for nonexistent array elems

This commit fixes bug #7508 and provides the groundwork for fixing
several other bugs.

Elements of @_ are aliased to the arguments, so that \$_[0] within
sub foo will reference the same scalar as \$x if the sub is called
as foo($x).

&PL_sv_undef (the global read-only undef scalar returned by the
‘undef’ operator itself) was being used to represent nonexistent
array elements.  So the pattern would be broken for foo(undef), where
\$_[0] would vivify a new $_[0] element, treating it as having been
nonexistent.

This also causes other problems with constants under ithreads
(#105906) and causes a pending fix for another bug (#118691) to trig-
ger this bug.

This commit changes the internals to use a null pointer to represent a
nonexistent element.

This requires that Storable be changed to account for it.  Also,
IPC::Open3 was relying on the bug.  So this commit patches
both modules.

10 years agoMove super cache into mro meta
Father Chrysostomos [Sun, 18 Aug 2013 07:36:05 +0000 (00:36 -0700)]
Move super cache into mro meta

Iterated hashes shouldn’t have to allocate space for something
specific to stashes, so move the SUPER method cache from the
HvAUX struct (which all iterated hashes have) into the mro
meta struct (which only stashes have).

10 years agoadd perl5181delta
Father Chrysostomos [Wed, 21 Aug 2013 01:05:57 +0000 (18:05 -0700)]
add perl5181delta

10 years ago[perl #118753] Remove erroneous elsif("") warning
Father Chrysostomos [Tue, 20 Aug 2013 20:21:14 +0000 (13:21 -0700)]
[perl #118753] Remove erroneous elsif("") warning

‘5 || foo’ gets optimised down to a plain ‘5’.  If that happens in
void context, we should not get a warning, as constant folding is not
supposed to change behaviour.

We accomplish that by flagging the constant with
OPpCONST_SHORTCIRCUIT.  The code that warns checks for the absence of
that flag first.

Commit f6f3a1fea, in order to improve line number accuracy in elsif,
changed the condition in elsif() to have a nulled COP (containing line
numbers) with the condition as its kidop.

That prevented constant folding from happening, so commit 71c4dbc37
implemented a function (search_const) to search to find a constant
below the nulled COP, but only used it to make folding happen, and did
not use it for OPpCONST_SHORTCIRCUIT.

The result was that if($foo){}elsif(""){} (mostly equivalent to
$foo ? do{} : "" && do {} internally) got folded to $foo ? do{} : ""
without OPpCONST_SHORTCIRCUIT being set on the final "".  So the warn-
ing occurs.

This commit uses search_const to set OPpCONST_SHORTCIRCUIT, and the
warning vanishes.

10 years agothread_it.pl: Increase Mac stack
Father Chrysostomos [Tue, 20 Aug 2013 20:05:04 +0000 (13:05 -0700)]
thread_it.pl: Increase Mac stack

At Vincent’s suggestion (<5213ABBE.9080706@profvince.com>), increase
the Mac stack size to 1000000.

10 years agoFilter-Simple tests: swap out base for parent.
kevin dawson [Tue, 20 Aug 2013 19:18:38 +0000 (20:18 +0100)]
Filter-Simple tests: swap out base for parent.

kevin dawson is now an author.

For: RT #119393

10 years agoTypo fix in perlunicode
Victor [Tue, 20 Aug 2013 11:18:20 +0000 (15:18 +0400)]
Typo fix in perlunicode

characters with ordinal 0x100 cannot be downgraded, thus
all characters >= 0x100 have character semantic.

10 years agoUpdate the RMG following the release of 5.19.3
Steve Hay [Tue, 20 Aug 2013 21:54:09 +0000 (22:54 +0100)]
Update the RMG following the release of 5.19.3

Reflow a paragraph with an odd newline, update a couple of previous commit
links (but keeping one as a major update (5.18->5.19) since it contains
more edits), update mention of the variables and files involved in the
Module::CoreList update, remove an out-dated reference to makerel adding
DOS line endings (it hasn't done that since 1f9a80b25f), and clarify that
CPAN's /src/README.html only lists stable releases.

10 years agoIncrease XS::Typemap::VERSION to 0.11
Father Chrysostomos [Tue, 20 Aug 2013 08:06:53 +0000 (01:06 -0700)]
Increase XS::Typemap::VERSION to 0.11

10 years ago[perl #118693] Remove PADTMP exemption from uninit warnings
Father Chrysostomos [Mon, 19 Aug 2013 23:16:37 +0000 (16:16 -0700)]
[perl #118693] Remove PADTMP exemption from uninit warnings

This fixes a problem with undefined values return from XSUBs not pro-
ducing such warnings.

The default typemap for XSUBs uses the target of the entersub call (in
the caller’s pad) to return the converted value, instead of having to
allocate a new SV for that.

So, for example, a function returning char* will cause that char* to
be assigned to the target via sv_setpv.  Then the target is returned.

As a special case, NULL return from a char*-returning function will
produce an undef return value.  This undef return value was not trig-
gering an uninitialized warning.

All targets are marked PADTMP, and anything marked PADTMP is exempt
from uninitialized warnings in some code paths, but not others.

This goes all the way back to 91bba347, which suppressed the warning
with only a hit at why (something to do with bitwise ops warning inap-
propriately).  I think it was to make ~undef exempt.  But a1afd104
stopped it from being exempt.

Only a few pieces of code were relying on this exemption, and it was
hiding bugs, too.  The last few commits have addressed those, so kiss
this exemption good-bye!

pp_reverse had a workaround to force an uninit warning (since
1e21d011c), so remove the workaround to avoid a double uninit warning.

10 years agoAvoid double stringification in pp_complement
Father Chrysostomos [Tue, 20 Aug 2013 07:17:15 +0000 (00:17 -0700)]
Avoid double stringification in pp_complement

Commit 91bba347 made targets exempt from uninit warnings.  The com-
mit message only says it has something to do with fixing warnings on
bitwise ops.

Commit a1afd1046 worked around that by doing an extra stringifica-
tion before assigning to the target, to produce an uninit warning
on purpose.

As far as I can tell, the only purpose of 91bba347 was to avoid the
warning for ~undef.  (I haven’t actually tried building the commit
before that to confirm.)

In any case, the uninit warning has been long tested for and is now
expected behaviour.

Since I am about to remove the uninit warning exemption for targets,
stop relying on that.

This speed ups the code slightly, as we avoid a double string-
ification.

10 years agoFix skip logic in pad_tidy and cv_clone
Father Chrysostomos [Tue, 20 Aug 2013 06:17:08 +0000 (23:17 -0700)]
Fix skip logic in pad_tidy and cv_clone

Commit 325e1816dc changed the logic for determining whether a pad
entry is to be treated like a constant; i.e., shared between recursion
levels and sub clones.

According the old logic, a pad entry must be shared if it is marked
READONLY or is a shared hash key scalar.  According to the new logic,
the entry must be shared if the pad name has a zero-length PV (i.e.,
&PL_sv_no).

Two pieces of code were still following the old logic.  Changing them
fixes this old bug:

my $close_over_me;
sub  {
    () = $close_over_me;
    open my $fh, "/dev/null";
    print "$$fh\n"
}->();
__END__

Output:
*main::

The name attached to the implicit rv2gv op in open() was not being
copied by sub clones.

The previous commit is also part of the fix.

In the tests, I tested the combination of sub cloning and recursion,
since it seemed like a good idea (and also as a result of copying and
pasting :-).

S_pmtrans was still relying on the old logic, so it gets changed, too.

10 years agoStop recursion from losing lex fh names
Father Chrysostomos [Tue, 20 Aug 2013 00:39:45 +0000 (17:39 -0700)]
Stop recursion from losing lex fh names

sub r {
    r($_[0]-1) if $_[0];
    open my $fh, "/dev/null";
    print "$_[0] $$fh\n"
}
r(5);
__END__

Output:
0 *main::
1 *main::
2 *main::
3 *main::
4 *main::
5 *main::$fh

The largest number represents the outermost call.

The handle name was being allocated as a target (a scratch variable
used by various operators to return values).  Targets are not shared
between recursion levels.

This commit tells pad_alloc to treat it like a constant, so it
is shared.

10 years agoBump version for 5.19.4
Steve Hay [Tue, 20 Aug 2013 16:52:30 +0000 (17:52 +0100)]
Bump version for 5.19.4

10 years agoCreate new perldelta for 5.19.4
Steve Hay [Tue, 20 Aug 2013 16:43:35 +0000 (17:43 +0100)]
Create new perldelta for 5.19.4

10 years agoAdd Perl 5.19.3 epigraph
Steve Hay [Tue, 20 Aug 2013 16:31:29 +0000 (17:31 +0100)]
Add Perl 5.19.3 epigraph

10 years agoUpdate perlhist v5.19.3
Steve Hay [Tue, 20 Aug 2013 10:45:52 +0000 (11:45 +0100)]
Update perlhist

10 years agoFinalize perldelta
Steve Hay [Tue, 20 Aug 2013 10:40:31 +0000 (11:40 +0100)]
Finalize perldelta

10 years agoComplete Module::CoreList's update for v5.19.3
Steve Hay [Tue, 20 Aug 2013 10:12:04 +0000 (11:12 +0100)]
Complete Module::CoreList's update for v5.19.3

10 years agothread_it.pl: Tweak stack sizes
Father Chrysostomos [Tue, 20 Aug 2013 07:38:57 +0000 (00:38 -0700)]
thread_it.pl: Tweak stack sizes

The stack size appropriate to HP-UX is too small for some systems,
where the default is fine.  (See <20130816182909.GA14081@iabyn.com>.)
On Mac OS X, the size appropriate to HP-UX is too small, as is the
default.

10 years agoperldelta - Mention documentation changes not so far covered
Steve Hay [Tue, 20 Aug 2013 00:50:12 +0000 (01:50 +0100)]
perldelta - Mention documentation changes not so far covered

10 years agoFix version's test scripts' $Verbose flag
Steve Hay [Mon, 19 Aug 2013 14:43:01 +0000 (15:43 +0100)]
Fix version's test scripts' $Verbose flag

The four scripts that use it should declare it a package variable, not a
lexical, otherwise the typeglob used in coretests.pm won't affect it.
Also, we want to set $Verbose to 0, not to $0, if $ENV{PERL_CORE} is set.

These customizations are being pushed upstream in CPAN RT#87513.

10 years agoversion has been upgraded from 0.9902 to 0.9903
Steve Hay [Mon, 19 Aug 2013 12:42:08 +0000 (13:42 +0100)]
version has been upgraded from 0.9902 to 0.9903

Blead customizations have been incorporated and the test scripts no longer
require customizations for blead, but 07locale.t is still out of sync with
the CPAN release.

10 years agoPATCH: Synchronize version.pm CPAN with core
John Peacock [Mon, 19 Aug 2013 12:16:50 +0000 (13:16 +0100)]
PATCH: Synchronize version.pm CPAN with core

Date: Fri, 16 Aug 2013 08:59:49 -0400
Message-ID: <520E2245.3020309@havurah-software.org>

(Amended by the committer to preserve local changes in 07locale.t from
3fca3d61b552b8da4cb82e43e9eac517631ef737 (the first part of hunk #2 is not
in 0.9903) and 02aba72f9af3ac175d1dfacad3955de025cd7130 (not in 0.9903 at
all), and to fix a "tab after spaces" problem in version.pm. These changes
are being sent back upstream in CPAN RT#87513.)

10 years agoCarp.pm: Restore defined &overload::StrVal check
Father Chrysostomos [Mon, 19 Aug 2013 14:16:48 +0000 (07:16 -0700)]
Carp.pm: Restore defined &overload::StrVal check

See 578ded8b8.  This was accidentally changed by f7c3eab3866.

10 years agoUpdate META files following commit ac2e5ad
Steve Hay [Mon, 19 Aug 2013 11:51:40 +0000 (12:51 +0100)]
Update META files following commit ac2e5ad

I must run nmake test(_porting) before committing
I must run nmake test(_porting) before committing
I must run nmake test(_porting) before committing

(Presumably this will result in perl's I18N::LangTags getting indexed by
PAUSE now, which may resolve the problems mentioned in that previous
commit.)

10 years agoRemove I18N::LangTags's DISTRIBUTION entry from Maintainers.pl
Steve Hay [Mon, 19 Aug 2013 11:05:10 +0000 (12:05 +0100)]
Remove I18N::LangTags's DISTRIBUTION entry from Maintainers.pl

Blead's version (0.39) is different from Sean's last CPAN release (0.35)
nine years ago and I18N::LangTags currently doesn't appear in CPAN's
02packages.details.txt, which is probably the cause of core-cpan-diff -a -x
complaining "I18N::LangTags: Can't determine current CPAN entry". Most
distros having MAINTAINER 'p5p' don't have a DISTRIBUTION entry (and all
those that do specify a recent CPAN release which blead is in sync with),
so the simplest way to squelch this warning is to remove the DISTRIBUTION
entry for I18N::LangTags until such time as a new CPAN release is made
(currently not looking very likely).

Aside: Searching for I18N::LangTags on search.cpan.org currently finds
perl-5.12.5, presumably on the basis that it's the most recent release of
anything containing the last CPAN release of this module (0.35). It would
be nice if it (currently) found 5.18.1 instead. I don't know why it
doesn't, given that PAUSE's View Permissions says that P5P is the owner.

10 years ago[perl #92446] don't use overloaded string values in the backtrace
Tony Cook [Mon, 19 Aug 2013 03:58:07 +0000 (13:58 +1000)]
[perl #92446] don't use overloaded string values in the backtrace

Allowing string overloading caused some CPAN module tests to fail.

While it seems reasonable to allow "" overloading for the backtrace, it has
several problems:

- the overloaded stringification may be suitable for end-users, but not
  for debugging, the raw reference display at least allows for identifying
  which object is involved

- the overload may not be suitable for calling in an exception, eg. it may
  call parts of Carp itself internally, or throw its own exception

- the overload may not be intended for use, eg. deprecation

This changes fixes the failures for Data-Hive and Contextual-Return
reported in [perl #119321]

10 years agoperldelta - Devel::PPPort upgrade
Steve Hay [Mon, 19 Aug 2013 01:15:03 +0000 (02:15 +0100)]
perldelta - Devel::PPPort upgrade

10 years agoUpdate Maintainers.pl etc for Devel-PPPort upgrade to 3.21
Steve Hay [Sun, 18 Aug 2013 15:49:28 +0000 (16:49 +0100)]
Update Maintainers.pl etc for Devel-PPPort upgrade to 3.21

In particular, the customizations to four files have now been merged
upstream so we must remove their entries from customized.dat

10 years agoTurn off executable bit accidentally added to Devel-PPPort files
Steve Hay [Sun, 18 Aug 2013 15:47:31 +0000 (16:47 +0100)]
Turn off executable bit accidentally added to Devel-PPPort files

10 years agoUpdate Devel-PPPort to CPAN version 3.21
Marcus Holland-Moritz [Sat, 17 Aug 2013 14:04:57 +0000 (15:04 +0100)]
Update Devel-PPPort to CPAN version 3.21

[DELTA]

3.21 - 2013-08-17

    * Fix cpan #87870: Merge core perl commit 90b0dc0e2e
      (Thanks to Father Chrysostomos for the original patch and
       to Steve Hay for forwarding it)
    * Fix cpan #86975: Deterministically order API elements in POD
      (Thanks to Karl Williamson for providing a patch.)
    * Fix cpan #81796: my $_ is deprecated
      (Thanks to Nicholas Clark for providing a patch)
    * Fix cpan #81484: fix isASCII and isCNTRL for inputs > 255
      (Thanks to Karl Williamson for providing a patch)
    * Fix cpan #80314: make use of PERL_NO_GET_CONTEXT the default
    * Fix cpan #79814: Install to 'site' for perl 5.11+
      (Thanks to Robert Sedlacek for providing a patch)
    * Fix cpan #78271: Need SvPV_nomg_nolen
    * Adapt buildperl.pl for newer Perl releases
    * Update masked_versions regex for 5.005 thread builds
    * Some tweaks needed to support 5.003 on 64-bit platforms

10 years agoperldelta - Remove all but one XXX notices
Steve Hay [Mon, 19 Aug 2013 00:42:33 +0000 (01:42 +0100)]
perldelta - Remove all but one XXX notices

Also, move a performance bug fix to the Performance Enhancements section
and mention new test scripts in the Testing section.

10 years agoperldelta - Standardize references to other versions of Perl
Steve Hay [Mon, 19 Aug 2013 00:13:17 +0000 (01:13 +0100)]
perldelta - Standardize references to other versions of Perl

10 years agoperldelta - Fill in the remaining stuff that needed to be done still
Steve Hay [Mon, 19 Aug 2013 00:04:38 +0000 (01:04 +0100)]
perldelta - Fill in the remaining stuff that needed to be done still

Commit 8fe3c67 was actually part of merge e82485c, covered already by
31d5dc6.

10 years agoTrim second block (nolinenumbers) to avert crashes on Win32.
James E Keenan [Sun, 18 Aug 2013 23:47:31 +0000 (01:47 +0200)]
Trim second block (nolinenumbers) to avert crashes on Win32.

In second block of tests, eliminate all tests except those needed to prove
that ParseXS can write a .c file without line numbers.  We will treat this as
sufficient because the tests we are deleting are causing crashes on Windows.

For: RT #119231

10 years agoUpdate t/porting/customized.dat
Steve Hay [Sun, 18 Aug 2013 21:09:37 +0000 (22:09 +0100)]
Update t/porting/customized.dat

Time::HiRes's Makefile.PL is no longer CUSTOMIZED, as of commit 0f0eae2

10 years agoperldelta - Fill in TODO items regarding modules and pragmata
Steve Hay [Sun, 18 Aug 2013 20:37:08 +0000 (21:37 +0100)]
perldelta - Fill in TODO items regarding modules and pragmata

10 years agoperldelta - Add entries for perldiag changes in 6f1b3ab and 6c341f6
Steve Hay [Sun, 18 Aug 2013 18:47:49 +0000 (19:47 +0100)]
perldelta - Add entries for perldiag changes in 6f1b3ab and 6c341f6

10 years agoavoid eval misinterpretation on old perls
Zefram [Sun, 18 Aug 2013 13:41:52 +0000 (14:41 +0100)]
avoid eval misinterpretation on old perls

An eval-BLOCK in the Carp test suite is misinterpreted by perl 5.6 as an
eval-STRING.  Add a do-BLOCK wrapper inside the block to satisfy perl 5.6.

10 years agobetter check for overload::StrVal
Zefram [Sun, 18 Aug 2013 13:24:30 +0000 (14:24 +0100)]
better check for overload::StrVal

The overloading logic in Carp got confused on perl 5.6 by the overload
module not setting $VERSION.  As the overload-is-loaded check controls
the use of overload::StrVal(), check for that sub being defined rather
than checking $VERSION.

10 years agoavoid "uninitialized value" warnings in Carp
Zefram [Sun, 18 Aug 2013 12:50:13 +0000 (13:50 +0100)]
avoid "uninitialized value" warnings in Carp

On older Perls, a call of the form $undef->() generates an "uninitialized
value" warning before dying.  The new overloaded-object logic in Carp
assumes the more modern behaviour, that the undefinedness causes an
exception directly with no separate warning.  To restore compatibility of
Carp to older Perls, check explicitly for definedness of $RefArgFormatter
rather than relying on the exception.

10 years agoLet t/mro/basic.t be run from the top level
Father Chrysostomos [Sun, 18 Aug 2013 07:04:03 +0000 (00:04 -0700)]
Let t/mro/basic.t be run from the top level

10 years agoperldelta entry for the prev. commit
Father Chrysostomos [Sun, 18 Aug 2013 07:02:19 +0000 (00:02 -0700)]
perldelta entry for the prev. commit

10 years ago[perl #114864] Make UNIVERSAL::DESTROY changes invalidate caches
Father Chrysostomos [Sun, 18 Aug 2013 06:58:47 +0000 (23:58 -0700)]
[perl #114864] Make UNIVERSAL::DESTROY changes invalidate caches

Commit 8c34e50d inadvertently caused DESTROY caches not to be
reset when UNIVERSAL::DESTROY changes.  Normally, a change to
a method will cause mro_method_changed_in to be called on all
subclasses, but mro.c cheats for UNIVERSAL and just does
++PL_sub_generation.  So clearing the DESTROY cache explicitly
in mro_method_changed_in is clearly not enough.

10 years agoperldelta: c56ed9f deserves no mention
Father Chrysostomos [Sun, 18 Aug 2013 06:12:46 +0000 (23:12 -0700)]
perldelta: c56ed9f deserves no mention

It fixed a bug in the handling of a certain combination of SV flags
that never happened in 5.19.2 and earlier.

10 years agoupdate Time-HiRes to version 1.9726 from CPAN
Zefram [Sat, 17 Aug 2013 22:47:23 +0000 (23:47 +0100)]
update Time-HiRes to version 1.9726 from CPAN

10 years agoperldelta - Fix POD typo
Steve Hay [Sat, 17 Aug 2013 18:12:43 +0000 (19:12 +0100)]
perldelta - Fix POD typo