This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
8 years agoNo need to list FindExt in perldelta - it isn't an installed module
Steve Hay [Mon, 30 Mar 2015 07:38:07 +0000 (08:38 +0100)]
No need to list FindExt in perldelta - it isn't an installed module

8 years agoSort list of upgraded modules in perldelta
Steve Hay [Mon, 30 Mar 2015 07:35:36 +0000 (08:35 +0100)]
Sort list of upgraded modules in perldelta

8 years agoperldelta for previous commit
Steve Hay [Mon, 30 Mar 2015 07:34:26 +0000 (08:34 +0100)]
perldelta for previous commit

8 years agoUpgrade IO-Socket-IP from version 0.36 to 0.37
Steve Hay [Thu, 26 Mar 2015 08:26:27 +0000 (08:26 +0000)]
Upgrade IO-Socket-IP from version 0.36 to 0.37

8 years agoperlrecharclass: Fix typo
Karl Williamson [Mon, 30 Mar 2015 03:23:54 +0000 (21:23 -0600)]
perlrecharclass: Fix typo

8 years agoperlrebackslash: Nit
Karl Williamson [Mon, 30 Mar 2015 03:23:14 +0000 (21:23 -0600)]
perlrebackslash: Nit

8 years agoReword reference to $ENV{PERL_UNICODE} in utf8
Randy Stauner [Sat, 28 Mar 2015 17:42:17 +0000 (10:42 -0700)]
Reword reference to $ENV{PERL_UNICODE} in utf8

"The $ENV{...}," doesn't read well;
Spell it out for consistency with perlrun.

Committer: Increment $VERSION and add entry to perldelta.

8 years agoperlhacktips: Add caution about clib ptr returns to static memory
Karl Williamson [Sun, 29 Mar 2015 02:54:49 +0000 (20:54 -0600)]
perlhacktips: Add caution about clib ptr returns to static memory

8 years agoDon't raise Wide char warning in UTF-8 locale
Karl Williamson [Sat, 28 Mar 2015 04:18:01 +0000 (22:18 -0600)]
Don't raise Wide char warning in UTF-8 locale

This belongs in the category of "I can't believe I did that."  Commit
613abc6d16e99bd9834fe6afd79beb61a3a4734d introduced warning messages
when a multi-byte character is operated on in a single byte locale.  But
the two macros introduced fail to suppress said messages when in a
multi-byte locale where the operation is perfectly valid.

This partially solves v5.22 blocker [perl #123527].  But it could still
fail if the test files are called from within a non-UTF-8 locale.  I
will issue a pull request for fixing that.

8 years ago[perl #124153] Fix require(v5.6)
Father Chrysostomos [Fri, 27 Mar 2015 20:30:29 +0000 (13:30 -0700)]
[perl #124153] Fix require(v5.6)

For some reason the argument to require v5.6 has the NOK flag on,
but the parenthesized version lacks that flag, so the code added in
v5.21.3-504-ged6f447 to precompute the hash was wrong, and caused
require(v5.6) to lose its vstringness.

8 years agoFix "...without parentheses is ambuguous" warning for UTF-8 function names
Alex Vandiver [Mon, 23 Mar 2015 03:08:24 +0000 (23:08 -0400)]
Fix "...without parentheses is ambuguous" warning for UTF-8 function names

While isWORDCHAR_lazy_if is UTF-8 aware, checking advanced byte-by-byte.
This lead to errors of the form:

   Passing malformed UTF-8 to "XPosixWord" is deprecated
   Malformed UTF-8 character (unexpected continuation byte 0x9d, with
     no preceding start byte)
   Warning: Use of "�" without parentheses is ambiguous

Use UTF8SKIP to advance character-by-character, not byte-by-byte.

8 years agoAllow unquoted UTF-8 HERE-document terminators
Alex Vandiver [Mon, 23 Mar 2015 02:45:54 +0000 (22:45 -0400)]
Allow unquoted UTF-8 HERE-document terminators

When not explicitly quoted, tokenization of the HERE-document terminator
dealt improperly with multi-byte characters, advancing one byte at a
time instead of one character at a time.  This lead to
incomprehensible-to-the-user errors of the form:

    Passing malformed UTF-8 to "XPosixWord" is deprecated
    Malformed UTF-8 character (unexpected continuation byte 0xa7, with
      no preceding start byte)
    Can't find string terminator "EnFra�" anywhere before EOF

If enclosed in single or double quotes, parsing was correctly effected,
as delimcpy advances byte-by-byte, but looks only for the single-byte
ending character.

When doing a \w+ match looking for the end of the word, advance
character-by-character instead of byte-by-byte, ensuring that the size
does not extend past the available size in PL_tokenbuf.

8 years ago[perl #124113] Make check for multi-dimensional arrays be UTF8-aware
Alex Vandiver [Mon, 23 Mar 2015 02:39:23 +0000 (22:39 -0400)]
[perl #124113] Make check for multi-dimensional arrays be UTF8-aware

During parsing, toke.c checks if the user is attempting provide multiple
indexes to an array index:

    $a[ $foo, $bar ];

However, while checking for word characters in variable names is aware
of multi-byte characters if "use utf8" is enabled, the loop is only
advanced one byte at a time, not one character at a time.  As such,
multibyte variables in array indexes incorrectly yield warnings:

    Passing malformed UTF-8 to "XPosixWord" is deprecated
    Malformed UTF-8 character (unexpected continuation byte 0x9d, with
      no preceding start byte)

Switch the loop to advance character-by-character if UTF-8 semantics are
in use.

8 years ago[perl #124099] Wrong CvOUTSIDE in find_lexical_cv
Father Chrysostomos [Fri, 27 Mar 2015 19:39:54 +0000 (12:39 -0700)]
[perl #124099] Wrong CvOUTSIDE in find_lexical_cv

Instead of following the chain of CvOUTSIDE pointers, I had it always
looking at the CvOUTSIDE pointer of the current PL_compcv.  So any
time it had to dig down more than one level, it had a chance of crash-
ing or looping.

8 years agoStop $^H |= 0x1c020000 from enabling all features
Father Chrysostomos [Fri, 27 Mar 2015 16:23:41 +0000 (09:23 -0700)]
Stop $^H |= 0x1c020000 from enabling all features

That set of bits sets the feature bundle to ‘custom’, which means that
the features are set by %^H, and also indicates that %^H has been did-
dled with, so it’s worth looking at.

In the specific case where %^H is untouched and there is no corres-
ponding cop hint hash behind the scenes, Perl_feature_is_enabled (in
toke.c) ends up returning TRUE.

Commit v5.15.6-55-g94250ae sped up feature checking by allowing
refcounted_he_fetch to return a boolean when checking for existence,
instead of converting the value to a scalar, whose contents we are not
even going to use.

This was when the bug started happening.  I did not update the code
path in refcounted_he_fetch that handles the absence of a hint hash.
So it was returning &PL_sv_placeholder instead of NULL; TRUE instead
of FALSE.

This did not cause problems for most code, but with the introduction
of the new bitwise ops in v5.21.8-150-g8823cb8, it started causing
uni::perl to fail, because they were implicitly enabled, making ^ a
numeric op, when it was being used as a string op.

8 years agoif.pm: Note that works with 'no' besides 'use' if-0.0604
Karl Williamson [Fri, 27 Mar 2015 03:33:04 +0000 (21:33 -0600)]
if.pm: Note that works with 'no' besides 'use'

8 years ago[perl #123790] Disable targlex for some ops
Father Chrysostomos [Thu, 26 Mar 2015 19:44:57 +0000 (12:44 -0700)]
[perl #123790] Disable targlex for some ops

The targlex optimisation (which makes the op write directly to the
lexical in $lexical = some op, skipping the assignment) does not take
typeglob assignment into account.  Since this optimisation has been
enabled for some ops in 5.21.x, we actually have a regression.  So
this commit disables the optimisation once more for ops that did not
have it on in 5.20.  This is a temporary fix, until we find a better
overall fix.  Other ops that still have the optimisation are buggy,
but no more buggy than in 5.20.

8 years agoconcat2.t: Mention where concat.t is
Father Chrysostomos [Thu, 26 Mar 2015 15:48:57 +0000 (08:48 -0700)]
concat2.t: Mention where concat.t is

When this comment was written, they were both in the same folder, but
concat.t has since moved.

8 years agoUpdate supported versions in perlpolicy.pod
Matthew Horsfall (alh) [Thu, 26 Mar 2015 20:55:11 +0000 (16:55 -0400)]
Update supported versions in perlpolicy.pod

8 years ago[perl #124160] Disable targlex for state var init
Father Chrysostomos [Thu, 26 Mar 2015 05:55:20 +0000 (22:55 -0700)]
[perl #124160] Disable targlex for state var init

The targlex optimisation optimises away an assignment to a lexical
variable, having the operator on the rhs write directly to the lexi-
cal itself.  This optimisation has a bug in it (#101640) that causes
$lex = "a $b c" to stringify the result, instead of allowing con-
cat overloding to return something other than a string.  I extended
the optimisation to occur with state variable initialization, in
v5.21.5-366-ga1b22ab, not realising it would make an existing bug
occur more often.  For now, just disable the new optimisation.

8 years ago[perl #123790] Assert fail with *x=<y>
Father Chrysostomos [Wed, 25 Mar 2015 17:33:44 +0000 (10:33 -0700)]
[perl #123790] Assert fail with *x=<y>

When assigning undef to its target, readline needs to take into
account that it might be a typeglob.  sv_setsv knows how handle this,
but SvOK_off is simply wrong.

This fixes this particular crash, but other issues in the ticket are
as yet unresolved.

8 years agoAdd B::Generate to perl5220delta
Father Chrysostomos [Wed, 25 Mar 2015 21:15:05 +0000 (14:15 -0700)]
Add B::Generate to perl5220delta

so I can close #123718.

8 years agoperlfunc: mention that study() is currently a noop
David Mitchell [Wed, 25 Mar 2015 16:04:58 +0000 (16:04 +0000)]
perlfunc: mention that study() is currently a noop

8 years agoIncrease $XS::APItest::VERSION to 0.72
Father Chrysostomos [Wed, 25 Mar 2015 05:10:20 +0000 (22:10 -0700)]
Increase $XS::APItest::VERSION to 0.72

8 years agogv_const_sv() handle subrefs directly in the stash
Tony Cook [Mon, 2 Mar 2015 04:59:32 +0000 (15:59 +1100)]
gv_const_sv() handle subrefs directly in the stash

With 2eaf799e sub declarations can store sub references directly in
the stash, but gv_const_sv(), which might be passed an entry from
the stash didn't handle that case.

8 years agoregen pod issues
Father Chrysostomos [Wed, 25 Mar 2015 05:03:15 +0000 (22:03 -0700)]
regen pod issues

8 years ago[perl #122322] Update OOK example in perlguts
Father Chrysostomos [Wed, 25 Mar 2015 05:02:11 +0000 (22:02 -0700)]
[perl #122322] Update OOK example in perlguts

It was not just the COW changes that needed to be accounted for, but
also the change in the storage of the offset.  The latter changed hap-
pened in 5.12, I think.

8 years agofix signed/unsigned mismatch in (M)EXTEND
Hugo van der Sanden [Tue, 24 Mar 2015 07:29:55 +0000 (07:29 +0000)]
fix signed/unsigned mismatch in (M)EXTEND

A large enough allocation request could wrap, causing MEXTEND to decide
the stack was already big enough.

8 years agoDeparse.t: test <<>>
Father Chrysostomos [Wed, 25 Mar 2015 00:57:14 +0000 (17:57 -0700)]
Deparse.t: test <<>>

8 years agoBump Deparse's $VERSION following commit 65ef2c3e7d945498.
Nicholas Clark [Tue, 24 Mar 2015 19:59:04 +0000 (20:59 +0100)]
Bump Deparse's $VERSION following commit 65ef2c3e7d945498.

8 years agoCorrectly deparse <<>>
Rafael Garcia-Suarez [Tue, 24 Mar 2015 14:40:27 +0000 (15:40 +0100)]
Correctly deparse <<>>

8 years agodiscourage use warnings FATAL => 'all'
David Golden [Mon, 23 Mar 2015 15:51:09 +0000 (11:51 -0400)]
discourage use warnings FATAL => 'all'

After additional discussions on perl5-porters and #p5p, no one seems to
be violently objecting to the idea that FATAL warnings need a much
stronger warning about risks and that FATAL => 'all' should actually be
'discouraged' in the official, perlpolicy sense.

The text of this commit has been posted to perl5-porters for discussion
and approved by those who objected to earlier language.

I dare not call it "consensus" for fear of the consequences, but no one
has raised further obstacles to making this change.

8 years agoReplace common Emacs file-local variables with dir-locals
Dagfinn Ilmari Mannsåker [Wed, 18 Mar 2015 00:37:04 +0000 (01:37 +0100)]
Replace common Emacs file-local variables with dir-locals

An empty cpan/.dir-locals.el stops Emacs using the core defaults for
code imported from CPAN.

Committer's work:

To keep t/porting/cmp_version.t and t/porting/utils.t happy, $VERSION needed
to be incremented in many files, including throughout dist/PathTools.

perldelta entry for module updates.

Add two Emacs control files to MANIFEST; re-sort MANIFEST.

For: RT #124119.

8 years agoPrepare Module::CoreList for 5.21.11 (if that happens)
Steve Hay [Fri, 20 Mar 2015 19:50:24 +0000 (19:50 +0000)]
Prepare Module::CoreList for 5.21.11 (if that happens)

8 years agoModule-CoreList version 5.20150320 is now on CPAN
Steve Hay [Fri, 20 Mar 2015 19:30:03 +0000 (19:30 +0000)]
Module-CoreList version 5.20150320 is now on CPAN

8 years agoBump version for 5.21.11 (if that happens)
Steve Hay [Fri, 20 Mar 2015 19:26:50 +0000 (19:26 +0000)]
Bump version for 5.21.11 (if that happens)

8 years agoCreate new perldelta for 5.21.11 (if that happens)
Steve Hay [Fri, 20 Mar 2015 19:15:54 +0000 (19:15 +0000)]
Create new perldelta for 5.21.11 (if that happens)

8 years agoTick off the 5.21.10 release
Steve Hay [Fri, 20 Mar 2015 19:14:28 +0000 (19:14 +0000)]
Tick off the 5.21.10 release

8 years agoAdd 5.21.10 epigraph
Steve Hay [Fri, 20 Mar 2015 19:14:11 +0000 (19:14 +0000)]
Add 5.21.10 epigraph

8 years agoAdd 5.21.10 to perlhist v5.21.10
Steve Hay [Fri, 20 Mar 2015 16:16:07 +0000 (16:16 +0000)]
Add 5.21.10 to perlhist

8 years agoFinalize perldelta
Steve Hay [Fri, 20 Mar 2015 16:15:55 +0000 (16:15 +0000)]
Finalize perldelta

8 years agoUpdate Module-CoreList for 5.21.10
Steve Hay [Fri, 20 Mar 2015 16:04:39 +0000 (16:04 +0000)]
Update Module-CoreList for 5.21.10

8 years agoDevel::PPPort has been upgraded from version 3.28 to 3.31
Steve Hay [Fri, 20 Mar 2015 15:33:53 +0000 (15:33 +0000)]
Devel::PPPort has been upgraded from version 3.28 to 3.31

8 years agoperldelta - Copy-editing, and wrap lines to 79 columns
Steve Hay [Fri, 20 Mar 2015 15:26:56 +0000 (15:26 +0000)]
perldelta - Copy-editing, and wrap lines to 79 columns

8 years agoperldelta - Remove boilerplate sections
Steve Hay [Fri, 20 Mar 2015 15:13:01 +0000 (15:13 +0000)]
perldelta - Remove boilerplate sections

8 years agoperldelta: Fix typo
Karl Williamson [Fri, 20 Mar 2015 15:00:55 +0000 (09:00 -0600)]
perldelta: Fix typo

8 years agoperldelta - Document remaining changes/module upgrades and fill in RT links
Steve Hay [Fri, 20 Mar 2015 14:23:20 +0000 (14:23 +0000)]
perldelta - Document remaining changes/module upgrades and fill in RT links

8 years agoUnicode::Collate has been upgraded from version 1.11 to 1.12
Steve Hay [Fri, 20 Mar 2015 13:16:26 +0000 (13:16 +0000)]
Unicode::Collate has been upgraded from version 1.11 to 1.12

8 years ago Update Unicode-Collate to CPAN version 1.12
Jarkko Hietaniemi [Fri, 20 Mar 2015 11:07:21 +0000 (07:07 -0400)]
Update Unicode-Collate to CPAN version 1.12

      [DELTA]

    1.12  Mon Mar 16 20:21:15 2015
        - XS: [rt.cpan.org #102663] IRIX 6.5 failures with Unicode::Collate
          (porting: avoid non-zero values in the initializer of an array)

8 years agoperldelta for EBCDIC now working
Karl Williamson [Fri, 20 Mar 2015 04:49:21 +0000 (22:49 -0600)]
perldelta for EBCDIC now working

8 years agounicore/README.perl:perl with older Unicode versions
Karl Williamson [Fri, 20 Mar 2015 04:16:15 +0000 (22:16 -0600)]
unicore/README.perl:perl with older Unicode versions

I tried to make the necessary changes for Perl v5.22 to work with old
Unicode versions, but ran out of time before the code freeze, with 5.1
being the earliest version.  The sticking point there is that the
Capital Sharp S, U+1E9E, was defined in that release.  Because of its
anomalous behavior with the infamous lower case sharp s, U+00DF, there
is a bunch of hard-coded references to it in the C code which need to be
adjusted to handle it's absence.

8 years agoUpdate information about using older Unicode
Karl Williamson [Fri, 20 Mar 2015 04:10:36 +0000 (22:10 -0600)]
Update information about using older Unicode

8 years agoregcomp.c: Fix so works on Unicode 5.2
Karl Williamson [Fri, 20 Mar 2015 03:49:30 +0000 (21:49 -0600)]
regcomp.c: Fix so works on Unicode 5.2

Unicode 5.2 had an anomalous situation, fixed in the next release, which
runs afoul of an assert() in regcomp.c.  This just modifies the assert
for it to not fail for this situation.

8 years agoregen/mk_invlists.pl: Handle earlier Unicode versions
Karl Williamson [Fri, 20 Mar 2015 03:35:11 +0000 (21:35 -0600)]
regen/mk_invlists.pl: Handle earlier Unicode versions

There are now hard-coded references in regexec.c to enum values for
\b{}.  Perl is supposed to work when compiled with earlier Unicode
releases, but these had fewer of these enum values.  This commit causes
mk_invlists.pl to make sure any missing ones are defined.  This means we
don't have to #ifdef the code.  An earlier release without an enum value
obviously won't have any code points that map to that value.

8 years agomktables: Better work with earlier Unicodes
Karl Williamson [Fri, 20 Mar 2015 03:00:15 +0000 (21:00 -0600)]
mktables: Better work with earlier Unicodes

Unicode adds new files to its character database from time to time in
new versions of the Standard.  mktables is supposed to be able to handle
this when it knows about a file, but it is compiling a version of the
Standard that predates that file's existence.  It was not dealing
properly with this situation.

8 years agoChange /(?[...]) to have normal operator precedence
Karl Williamson [Thu, 26 Feb 2015 06:19:39 +0000 (23:19 -0700)]
Change /(?[...]) to have normal operator precedence

This experimental feature now has the intersection operator ("&") higher
precedence than the other binary operators.

8 years agoperldelta for #123995 / b24768f02
Father Chrysostomos [Fri, 20 Mar 2015 02:58:09 +0000 (19:58 -0700)]
perldelta for #123995 / b24768f02

8 years agoperldelta for #124004 / c5f78d08da
Father Chrysostomos [Fri, 20 Mar 2015 02:57:29 +0000 (19:57 -0700)]
perldelta for #124004 / c5f78d08da

8 years agoperldelta for #123847 / 3d50185de
Father Chrysostomos [Fri, 20 Mar 2015 02:55:26 +0000 (19:55 -0700)]
perldelta for #123847 / 3d50185de

8 years agoperldelta for #123963 / 9d58dbc453
Father Chrysostomos [Fri, 20 Mar 2015 02:54:22 +0000 (19:54 -0700)]
perldelta for #123963 / 9d58dbc453

8 years agoperldelta for #123955 / ce7c414ee7
Father Chrysostomos [Fri, 20 Mar 2015 02:52:34 +0000 (19:52 -0700)]
perldelta for #123955 / ce7c414ee7

8 years agoperldelta for #123817 / 6b2b48acae
Father Chrysostomos [Fri, 20 Mar 2015 02:51:29 +0000 (19:51 -0700)]
perldelta for #123817 / 6b2b48acae

8 years agoperldelta for #123763 / 26f4cc19a
Father Chrysostomos [Fri, 20 Mar 2015 02:47:24 +0000 (19:47 -0700)]
perldelta for #123763 / 26f4cc19a

and 55b398034, too.

8 years agoperldelta for #123802 / 479ae48e22f11
Father Chrysostomos [Fri, 20 Mar 2015 02:46:27 +0000 (19:46 -0700)]
perldelta for #123802 / 479ae48e22f11

and 66edcf79f

8 years agoperldelta for #123801 / f4460c6f7a0
Father Chrysostomos [Fri, 20 Mar 2015 02:45:49 +0000 (19:45 -0700)]
perldelta for #123801 / f4460c6f7a0

8 years agoperldelta module updates
Steve Hay [Fri, 20 Mar 2015 00:49:12 +0000 (00:49 +0000)]
perldelta module updates

8 years agoCarp::Heavy is no longer customized
Steve Hay [Fri, 20 Mar 2015 00:44:19 +0000 (00:44 +0000)]
Carp::Heavy is no longer customized

8 years agoCarp::Heavy is no longer customized
Ricardo Signes [Thu, 19 Mar 2015 23:26:53 +0000 (19:26 -0400)]
Carp::Heavy is no longer customized

8 years agoCarp: remove unneeded VERSION eval, bump version
Ricardo Signes [Thu, 19 Mar 2015 22:59:54 +0000 (18:59 -0400)]
Carp: remove unneeded VERSION eval, bump version

8 years agoCarp: avoid hardcoded lines and filenames in test
Ricardo Signes [Thu, 19 Mar 2015 22:59:39 +0000 (18:59 -0400)]
Carp: avoid hardcoded lines and filenames in test

8 years agoBump Devel::PPPort version to 3.31
Matthew Horsfall (alh) [Tue, 17 Mar 2015 13:10:43 +0000 (09:10 -0400)]
Bump Devel::PPPort version to 3.31

8 years agoperl.h: Fix nit in comment
Karl Williamson [Thu, 19 Mar 2015 20:41:14 +0000 (14:41 -0600)]
perl.h: Fix nit in comment

8 years agoDocument API for XS LC_NUMERIC locale manipulation
Karl Williamson [Thu, 19 Mar 2015 20:39:06 +0000 (14:39 -0600)]
Document API for XS LC_NUMERIC locale manipulation

XS writers may need to manipulate the LC_NUMERIC locale.  Some macros
are available to do this.  This documents them and the issues.

8 years agoperllocale: Correctly document behavior
Karl Williamson [Thu, 19 Mar 2015 03:58:24 +0000 (21:58 -0600)]
perllocale: Correctly document behavior

8 years agoperl.h: White-space only
Karl Williamson [Thu, 19 Mar 2015 19:28:30 +0000 (13:28 -0600)]
perl.h: White-space only

Remove some empty /**/ and align line continuation backslashes onto tab
boundaries

8 years agoChange some locale manipulation macros in prep for API
Karl Williamson [Thu, 19 Mar 2015 19:06:27 +0000 (13:06 -0600)]
Change some locale manipulation macros in prep for API

This changes the way some of the current internal-only macros are named
and used in order to simplify things and minimize what gets exposed as
part of the API.

Although these have not been listed as publicly available, it costs
essentially nothing to keep the old names around in case someone was
illegally using them.

8 years agoregen/regcharclass.pl: Need to rebuild when source files change
Karl Williamson [Thu, 19 Mar 2015 17:23:58 +0000 (11:23 -0600)]
regen/regcharclass.pl: Need to rebuild when source files change

Like regen/mk_invlists.pl, if any of various Unicode-related files
change, we can't rely on the generated file remaining unchanged.

8 years agoregen/mk_invlists.pl depends on mktables
Karl Williamson [Thu, 19 Mar 2015 17:05:50 +0000 (11:05 -0600)]
regen/mk_invlists.pl depends on mktables

If mktables changes, the input data for this may also change.

8 years agoregen/mk_invlists.pl: Don't quit so easily
Karl Williamson [Fri, 13 Mar 2015 18:20:18 +0000 (12:20 -0600)]
regen/mk_invlists.pl: Don't quit so easily

Like the previous commit, this script may be called before mktables.lst
exists, and we can't generate mktables.lst without this script
executing to completion.  The missing file is only used to determine if
something has changed that we would need to recompile for so this script
can run faster next time it is called.

8 years agoregen/regen_lib.pl: Don't die on missing digest
Karl Williamson [Fri, 13 Mar 2015 18:06:40 +0000 (12:06 -0600)]
regen/regen_lib.pl: Don't die on missing digest

regen_lib now has the capability of calculating a digest for various
files passed to it, and saving those values in the generated output
file.  The passed in files are supposed to be the sources of the
generated file, so that on future regen runs, if no digest value has
changed, there should be no need to actually do the (potentially slow)
regen.

When bootstrapping up a perl, not everything may have been built before
a regen is attempted.  This was dieing under those conditions,
preventing the build from happening.  Thus we come to a dead-end.

This commit causes a random digest to be generated for a source file
that doesn't (yet) exist, instead of dieing.  That means that the build
can continue, and the source should be generated at some point in
it.  The random digest is not going to match the real one, so the next
time the regen happens, it will signal that things need to be rebuilt,
and then the actual digest of the source will be calculated and
stored.

Having the fake digest be a random number makes sure that, should the
missing file remain missing, that the regen will continue to rebuild
things each time.  So, if someone carelessly commits the result without
realizing there is an empty source, the Porting tests will fail, drawing
attention to the problem.

8 years agoUpgrade parent from version 0.228 to 0.232
Steve Hay [Thu, 19 Mar 2015 21:09:42 +0000 (21:09 +0000)]
Upgrade parent from version 0.228 to 0.232

8 years agolib/perl5db.pl: Fix pod typo
Karl Williamson [Thu, 19 Mar 2015 16:07:38 +0000 (10:07 -0600)]
lib/perl5db.pl: Fix pod typo

8 years agolib/perl5db.pl: Generalize for EBCDIC
Karl Williamson [Sun, 15 Mar 2015 03:50:49 +0000 (21:50 -0600)]
lib/perl5db.pl: Generalize for EBCDIC

8 years agoCreate single fcn for dup'd /lib code
Karl Williamson [Sun, 15 Mar 2015 03:50:27 +0000 (21:50 -0600)]
Create single fcn for dup'd /lib code

Several /lib .pm's have the same code which is complicated enough to
warrant being placed in a shared function.  This commit creates a .pm
to be used by these .pm's.

This implements the perhaps archaic 'Meta' notation wherein characters
above 0x7f are displayed as M- plus the ASCII-range character derived by
looking at only the lower 7 bits of the upper range one.  There are
problems with this, in that a literal control character can be in the
string, whereas it is trying to get rid of control characters.  But I
left it to work as-is, just centralizing the code.

On EBCDIC platforms this notation makes no sense because the bit
patterns are all mixed up about having the upper bit set.  So this
commit fixes things on these platforms, so these are changed to
\x{...}.  No literal control characters are emitted.

Another potential problem is that characters above 0xFF are passed
through, unchanged.  But again, I let the existing behavior stand.

8 years agoChange name of mro.c
Karl Williamson [Mon, 16 Mar 2015 17:14:12 +0000 (11:14 -0600)]
Change name of mro.c

This is to prevent a conflict showing up on z/OS (os390) because this
file's name is the same as one in /ext, and there are functions
cross-referenced between them, and the loader on that platform
can't deal with this.

See http://nntp.perl.org/group/perl.perl5.porters/226612

8 years agodbmopen() with a third argument of undef can create files on disk.
Nicholas Clark [Tue, 17 Mar 2015 14:25:02 +0000 (15:25 +0100)]
dbmopen() with a third argument of undef can create files on disk.

Hence we need to ensure that they are cleaned up.

8 years agoFix rendering of this code snippet in 'perldoc -f chomp'
Karen Etheridge [Thu, 19 Mar 2015 02:13:56 +0000 (19:13 -0700)]
Fix rendering of this code snippet in 'perldoc -f chomp'

In text, formerly rendered as:  ("$/ = """)
Now rendered as: ("$/ = ''") which is a tad less confusing

8 years agot/re/pat_re_eval.t: Skip encoding tests on EBCDIC
Karl Williamson [Wed, 18 Mar 2015 21:56:48 +0000 (15:56 -0600)]
t/re/pat_re_eval.t: Skip encoding tests on EBCDIC

These require changes to Encode which are not planned
to be put in v5.22

8 years agot/op/pack.t: Generalize for EBCDIC
Karl Williamson [Thu, 4 Apr 2013 03:56:02 +0000 (21:56 -0600)]
t/op/pack.t: Generalize for EBCDIC

There are still a few failures that are skipped and should be looked at
in v5.23.

8 years agosmartmatch: handle stack realloc
David Mitchell [Wed, 18 Mar 2015 17:06:49 +0000 (17:06 +0000)]
smartmatch: handle stack realloc

When smartmatch is matching a pattern against something, it was
failing to do appropriate PUTBACK and SPAGAIN's  before calling
matcher_matches_sv() (which pushes an arg an calls pp_match()).
If the stack was almost full, the extra push in matcher_matches_sv()
could cause a stack realloc, which would then be ignored when
pp_smartmatch() returned, setting PL_stack_sp to point to the old (freed)
stack.

Adding SPAGAIN ensures that PL_stack_sp points to the new stack, while
PUTBACK causes PL_stack_sp to no longer see the two args to pp_smartmatch,
so the PUSH in matcher_matches_sv() pushes the SV us9ng ones of two two
reclaimed slots, so the stack won't re-alloc anyway.

Thus by doing the "right thing" with both PUTBACK and SPAGAIN, we
doubly ensure that PL_stack_sp will always be right.

8 years agoupdate PL_stack_sp when we exit matcher_matches_sv()
Tony Cook [Thu, 19 Feb 2015 04:03:58 +0000 (15:03 +1100)]
update PL_stack_sp when we exit matcher_matches_sv()

8 years agoTODO test for smartmatch stack issue
Tony Cook [Thu, 19 Feb 2015 04:02:49 +0000 (15:02 +1100)]
TODO test for smartmatch stack issue

8 years agorepeat op: avoid integer overflows
David Mitchell [Wed, 11 Mar 2015 12:25:58 +0000 (12:25 +0000)]
repeat op: avoid integer overflows

For the list variant of the x operator, the overflow detection code
doesn't always work, resulting in the stack not being extended enough.

There are two places where an overflow could occur: calculating how
many stack items to extend by (items * count), and passing to repeatcpy()
how many bytes to copy 'items' SV pointers (items * sizeof(const SV *)).

The overflow detection was generally a mess; checking for overflow
using a value (max) that may have already overflown; checking whether
'max' had overflown incorrectly, and not checking (items * sizeof(const SV
*) at all (perhaps hoping that the other checks would be a superset of
this).

Also, some of the vars were still I32s; promote to 64-bit capable types.

Finally, the signature of Perl_repeatcpy() still has an I32 len;
that really should be changed to IV at some point; but for now I've just
ensured that the callers (list 'x' and scalar 'x') don't wrap.
I haven't put in a check for the only other core caller of repeatcpy(),
S_study_chunk(), since that would only become an issue compiling a pattern
with a fixed or floating substr within it of length > 2**31.

8 years agoop.c: rename CHANGE_TYPE() to OpTYPE_set()
David Mitchell [Thu, 19 Mar 2015 11:04:01 +0000 (11:04 +0000)]
op.c: rename CHANGE_TYPE() to OpTYPE_set()

This macro is private to op.c, and has an overly generic name.

8 years agouniversal.c: remove all trace of op_sibling
David Mitchell [Thu, 19 Mar 2015 10:02:00 +0000 (10:02 +0000)]
universal.c: remove all trace of op_sibling

The OpSIBLING() macro and op_sibling_splice() are a higher-level
way of manipulating optrees that ensure portability in the face of
PERL_OP_PARENT etc.

This commit also helps with the lofty goal of nothing outside of op.c
directly accessing the op_sibling field.

This is a follow-on/improvement to bac7a184cda7b.

8 years agoperlguts: clarify op_sibling usage
David Mitchell [Thu, 19 Mar 2015 09:49:14 +0000 (09:49 +0000)]
perlguts: clarify op_sibling usage

8 years agouniversal.c: PERL_OP_PARENT support
Father Chrysostomos [Thu, 19 Mar 2015 04:56:46 +0000 (21:56 -0700)]
universal.c: PERL_OP_PARENT support

8 years ago[perl #123995] Assert fail with s;@{<<;
Father Chrysostomos [Wed, 18 Mar 2015 09:35:50 +0000 (02:35 -0700)]
[perl #123995] Assert fail with s;@{<<;

If s;; gobbles up the implicit semicolon that is tacked on to the end
of the file, it can confuse the here-doc parser into thinking it is
inside a string eval, because there is no file handle.  We need to
check for that possibility where the assertion was failing.

8 years agoregcomp.c: White-space only
Karl Williamson [Tue, 17 Mar 2015 23:28:24 +0000 (17:28 -0600)]
regcomp.c: White-space only

Outdent code that the previous commit removed the surrounding block from

8 years agoFix qr'\N{U+41}' on EBCDIC platforms
Karl Williamson [Tue, 17 Mar 2015 04:38:20 +0000 (22:38 -0600)]
Fix qr'\N{U+41}' on EBCDIC platforms

Prior to this commit, the regex compiler was relying on the lexer to do
the translation from Unicode to native for \N{...} constructs, where it
was simpler to do.  However, when the pattern is a single-quoted string,
it is passed unchanged to the regex compiler, and did not work.  Fixing
it required some refactoring, though it led to a clean API in a static
function.

This was spotted by Father Chrysostomos.