This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
7 years agopp_ctl.c: false/true --> FALSE/TRUE
Craig A. Berry [Thu, 19 Jan 2017 16:10:36 +0000 (10:10 -0600)]
pp_ctl.c: false/true --> FALSE/TRUE

The win32 build died with the lower case versions.

Follow-up to 86191aed6f092273.

7 years ago[perl #129377] don't read past start of string for unmatched backref
Hugo van der Sanden [Wed, 5 Oct 2016 11:56:05 +0000 (12:56 +0100)]
[perl #129377] don't read past start of string for unmatched backref

We can have (start, end) == (0, -1) for an unmatched backref, we must
check for that.

7 years ago(perl #129342) test for buffer overflow
Tony Cook [Tue, 17 Jan 2017 00:52:53 +0000 (11:52 +1100)]
(perl #129342) test for buffer overflow

7 years ago[perl #129342] ensure range-start is set after error in tr///
Hugo van der Sanden [Wed, 5 Oct 2016 13:53:27 +0000 (14:53 +0100)]
[perl #129342] ensure range-start is set after error in tr///

A parse error due to invalid octal or hex escape in the range of a
transliteration must still ensure some kind of start and end values
are captured, since we don't stop on the first such error. Failure
to do so can cause invalid reads after "Here we have parsed a range".

7 years agoperldelta for 86191aed6f09
Tony Cook [Thu, 19 Jan 2017 06:35:49 +0000 (17:35 +1100)]
perldelta for 86191aed6f09

7 years ago(perl #129125) copy form data if it might be freed
Tony Cook [Thu, 19 Jan 2017 05:28:03 +0000 (16:28 +1100)]
(perl #129125) copy form data if it might be freed

If the format SV also appeared as an argument, and the FF_CHOP
operator modified that argument, the magic and hence the compiled
format would be freed, and the next iteration of the processing
the compiled format would read freed memory.

Unlike my original patch this copies the formsv too, since
that is also stored in the magic, and is needed for presenting
literal text from the format.

7 years ago(perl #126228) partly revert 8cc95fdb and fix a3c8358c origin/tonyc/126228-dxsub_sysx
Tony Cook [Mon, 16 May 2016 06:51:51 +0000 (16:51 +1000)]
(perl #126228) partly revert 8cc95fdb and fix a3c8358c

a3c8358c changed:

-#define dXSUB_SYS int dummy
+#define dXSUB_SYS

which made dXSUB_SYS into not-a-declaration, this apparently broke
something, since 8cc95fdb then went through all the definitions of
dXSUB_SYS, made each of them into not-a-declaration and then
ensured ExtUtilis::Miniperl emitted dXSUB_SYS in a place where it
didn't matter whether it was a declaration or a statement.

When these changes were made perl.h didn't have dNOOP, but now we
do, so we can make dXSUB_SYS a declaration again, as its name
implies.

Based on a patch originally created by Daniel Dragan (bulk88).

7 years agoAPItest/t/handy.t: Skip some tests on EBCDIC
Karl Williamson [Wed, 18 Jan 2017 18:05:47 +0000 (11:05 -0700)]
APItest/t/handy.t: Skip some tests on EBCDIC

The skipped tests are for malformed input for the various isCNTRL
functions.  Perl does not go out of its way to test for malformedness in
the these, only making sure they are well-formed if that is necessary
for the correct operation of the function.  Since all controls in EBCDIC
are represented by a single byte, and you can't malform a single byte,
all the malformedness control tests will not detect malformedness on
EBCDIC platforms, so skip them.

7 years agoAPItest/t/handy.t: Use more mnemonic variable names
Karl Williamson [Tue, 10 Jan 2017 16:46:23 +0000 (09:46 -0700)]
APItest/t/handy.t: Use more mnemonic variable names

The previous commit might not have been necessary if these had been more
mnemonic in the first place.

7 years agoRemove obsolete (PL_)statcache mentions in comments
Dagfinn Ilmari Mannsåker [Wed, 18 Jan 2017 12:39:28 +0000 (12:39 +0000)]
Remove obsolete (PL_)statcache mentions in comments

cando() has not used PL_statcache since Perl 3 (commit a687059cbaf)

7 years agoAvoid deprecation message.
Abigail [Tue, 17 Jan 2017 21:54:08 +0000 (22:54 +0100)]
Avoid deprecation message.

File::Glob::glob is deprecated. So, if we test it, we should avoid
the warning.

7 years agoAvoid triggering a deprecation warnings.
Abigail [Tue, 17 Jan 2017 21:21:29 +0000 (22:21 +0100)]
Avoid triggering a deprecation warnings.

The offending line is put in a block with "no warnings 'deprecated';".
The line can go after 5.26, as it'll be fatal in 5.28.

7 years agoAvoid deprecation warning.
Abigail [Tue, 17 Jan 2017 21:16:02 +0000 (22:16 +0100)]
Avoid deprecation warning.

Use of an unqualified dump() now gives a deprecation warning. So, change
dump into CORE::dump in the tests.

7 years agoadd S_process_optree() function to op.c
David Mitchell [Sat, 14 Jan 2017 16:02:46 +0000 (16:02 +0000)]
add S_process_optree() function to op.c

Extract into a new static function, S_process_optree(), some of the common
code that calls rpeep(), finalize_optree() etc in the various
newSUB()-style functions.

There should be no functional changes, except that for formats, pad_tidy()
is now called *after* optimisation. This matches what already happens for
normals subs, and can possibly be regarded as a bug fix - although I can't
think of anything it actually fixes.

There are probably more things that could be consolidated into this
function, but because the details vary amongst the various call sites,
I've left them alone for now.

7 years agoperldelta for 254707b
James E Keenan [Tue, 17 Jan 2017 13:42:28 +0000 (08:42 -0500)]
perldelta for 254707b

7 years agoUpdates CPAN.pm to ANDK/CPAN-2.16-TRIAL2.tar.gz
Andreas Koenig [Tue, 17 Jan 2017 08:27:49 +0000 (09:27 +0100)]
Updates CPAN.pm to ANDK/CPAN-2.16-TRIAL2.tar.gz

7 years agodavem's perldelta entries for 5.25.9 so far
David Mitchell [Tue, 17 Jan 2017 11:55:58 +0000 (11:55 +0000)]
davem's perldelta entries for 5.25.9 so far

7 years ago(perl #129149) fix the test so skip has a SKIP: to work with origin/tonyc/129149-fix-skip
Tony Cook [Tue, 17 Jan 2017 04:36:31 +0000 (15:36 +1100)]
(perl #129149) fix the test so skip has a SKIP: to work with

Thanks to bulk88 for pointing this out.

7 years agowarn at most once per literal about misplaced _
Zefram [Tue, 17 Jan 2017 00:04:00 +0000 (00:04 +0000)]
warn at most once per literal about misplaced _

Fixes [perl #70878].

7 years agoperldelta for bf4a926a2937
Tony Cook [Mon, 16 Jan 2017 23:56:33 +0000 (10:56 +1100)]
perldelta for bf4a926a2937

7 years ago(perl #129149) avoid a heap buffer overflow with pack "W"...
Tony Cook [Wed, 7 Sep 2016 06:51:39 +0000 (16:51 +1000)]
(perl #129149) avoid a heap buffer overflow with pack "W"...

7 years agoperldelta for 02c161ef974f
Tony Cook [Mon, 16 Jan 2017 22:27:15 +0000 (09:27 +1100)]
perldelta for 02c161ef974f

7 years agoperldelta: Fix typo
Karl Williamson [Mon, 16 Jan 2017 20:05:14 +0000 (13:05 -0700)]
perldelta: Fix typo

7 years agoMention changed deprecation messages in perldelta.
Abigail [Mon, 16 Jan 2017 18:10:04 +0000 (19:10 +0100)]
Mention changed deprecation messages in perldelta.

7 years agoThere's an objection to fatalizing jumping into a construct.
Abigail [Mon, 16 Jan 2017 10:44:30 +0000 (11:44 +0100)]
There's an objection to fatalizing jumping into a construct.

This reverts commit 84b32f52b10f9912b40ef378cd0b01f4aff80630.
This reverts commit d30393aaade31b605724846a30a10dd1e96cd181.

We need more debate on this one; either we should undeprecate it,
or settle on an end-of-life version.

7 years agoUse of $* and $# will be fatal in 5.30.
Abigail [Sun, 15 Jan 2017 21:23:47 +0000 (22:23 +0100)]
Use of $* and $# will be fatal in 5.30.

Initially, the plan was to just drop the deprecation message of $* and $#,
letting them be the magicless punctuation variables they are now. However,
we decided to make their use fatal, so we can use them in a future version
of Perl.

7 years agoRevert "Remove deprecation warnings related to $* and $#."
Abigail [Sun, 15 Jan 2017 12:23:34 +0000 (13:23 +0100)]
Revert "Remove deprecation warnings related to $* and $#."

This reverts commit e9b5346b919b4f4cc0096af4644cb0d48d64e14c.

We've decided that instead of leaving $* and $# as usuable, magic-free
variables, we instead make it fatal to use them. Therefore, we restore
the warnings their use gives, and in a subsequent commit, we fix the
warning to indicate the version where their use becomes fatal.

7 years agoRevert "Fix mentioning of C<$#>."
Abigail [Sun, 15 Jan 2017 12:23:12 +0000 (13:23 +0100)]
Revert "Fix mentioning of C<$#>."

This reverts commit b9a643355baa0bd9bc9b4e9cbaf51c8727589bfa.

7 years agoMention $! vs $^E in pod/perlport.pod
Abigail [Sat, 14 Jan 2017 21:34:30 +0000 (22:34 +0100)]
Mention $! vs $^E in pod/perlport.pod

Since 5.24, it has been deprecated to check $! after a Winsock function;
one such use $^E instead. However, since we do not have a deprecation
warning for this, we cannot set an EOL version of this deprecation.
As such, it just gets mentioned in perlport, and this will be the
only deprecation without an EOL version.

7 years agoUpdate an old email address of mine
Abigail [Sat, 14 Jan 2017 21:28:50 +0000 (22:28 +0100)]
Update an old email address of mine

7 years agoString bitwise operators will not accept code points > 0xFF in 5.28
Abigail [Sat, 14 Jan 2017 21:13:54 +0000 (22:13 +0100)]
String bitwise operators will not accept code points > 0xFF in 5.28

7 years agoReading/writing bytes from :utf8 handles will be fatal in 5.30
Abigail [Sat, 14 Jan 2017 20:44:56 +0000 (21:44 +0100)]
Reading/writing bytes from :utf8 handles will be fatal in 5.30

7 years agoDeprecating the modifyable variables in constants by 5.32.
Abigail [Sat, 14 Jan 2017 17:25:48 +0000 (18:25 +0100)]
Deprecating the modifyable variables in constants by 5.32.

It was already deprecated, but we're now adding a version number.

7 years agoMake it fatal to pass malformed UTF-8.
Abigail [Sat, 14 Jan 2017 03:01:39 +0000 (04:01 +0100)]
Make it fatal to pass malformed UTF-8.

Due to a bug in either Perl, or in some XS-code, it's possible
for a string which is supposed to be in UTF-8 format to not be
properly encoded. If you try to find out its type (digit,
punctuation) perl will now croak.

This behaviour was deprecated in Perl 5.18.

7 years agomy() in a false conditional will be fatal in Perl 5.30
Abigail [Sat, 14 Jan 2017 01:30:49 +0000 (02:30 +0100)]
my() in a false conditional will be fatal in Perl 5.30

7 years agoDeprecation of an unqualified dump() to mean CORE::dump().
Abigail [Fri, 13 Jan 2017 21:36:47 +0000 (22:36 +0100)]
Deprecation of an unqualified dump() to mean CORE::dump().

This will no longer be allowed in 5.30.

7 years agoDeprecating the use of C<< \cI<X> >> to specify a printable character.
Abigail [Fri, 13 Jan 2017 19:29:58 +0000 (20:29 +0100)]
Deprecating the use of C<< \cI<X> >> to specify a printable character.

Starting in 5.14, we deprecated the use of "\cI<X>" when this
results in a printable character. For instance, "\c:" is just
a fancy way of writing "z". Starting in 5.28, this will be a
fatal error.

This also includes certain usage in regular expressions with the
experimental (?[ ]) construct, or when "use re 'strict'" is in
effect (also experimental).

7 years agoB::OP::terse will go away in Perl 5.28.
Abigail [Thu, 24 Nov 2016 14:35:43 +0000 (15:35 +0100)]
B::OP::terse will go away in Perl 5.28.

Adjusted the deprecation message, and bumped the version of B::Terse.

7 years agoNo longer mention some uses of $SIG {__DIE__} are deprecated.
Abigail [Thu, 24 Nov 2016 12:57:23 +0000 (13:57 +0100)]
No longer mention some uses of $SIG {__DIE__} are deprecated.

The C<$SIG{__DIE__}> hook is called even inside an C<eval()>. It was
never intended to happen this way, but an implementation glitch made
this possible. This used to be deprecated, as it allowed strange action
at a distance like rewriting a pending exception in C<$@>. Plans to
rectify this have been scrapped, as users found that rewriting a
pending exception is actually a useful feature, and not a bug.

7 years agoRemove utils/c2ph and utils/pstruct
Abigail [Thu, 24 Nov 2016 12:22:10 +0000 (13:22 +0100)]
Remove utils/c2ph and utils/pstruct

These programs are the same, just behave differently depending on
under which name you call it.

This is a very old script, originally dating from the perl3 era.
It has been deprecated in favour of h2xs for a long time.

In Perl 5.26, these utilities will no longer be available.

7 years agoDon't recognize the --libpods option in Pod::Html
Abigail [Thu, 24 Nov 2016 11:40:04 +0000 (12:40 +0100)]
Don't recognize the --libpods option in Pod::Html

Since Perl 5.18, the --libpods option has been recognized, but
did not do anything other than issue a deprecation warnings.
As of now, using the --libpods option creates an error.

The version number of Pod::Html has bumped to 1.2202.

7 years agoRemove unneeded entry from pod/perldiag.pod
Abigail [Thu, 24 Nov 2016 00:11:01 +0000 (01:11 +0100)]
Remove unneeded entry from pod/perldiag.pod

It had an entry 'Use of %s is deprecated', matching the warnings
the deprecation() macro in handy.h could generate.

Most of these warning had already their own entries in perldiag.pod,
and the ones which did not, now do. Furthermore, the format of the
warnings has changed, as we now have a version in which the construct
disappears from Perl in the message.

7 years agoUse of inherited AUTOLOAD for non-methods will be fatal in 5.28.
Abigail [Wed, 23 Nov 2016 23:50:09 +0000 (00:50 +0100)]
Use of inherited AUTOLOAD for non-methods will be fatal in 5.28.

Which will be 21 years after it was deprecated (5.004).

7 years agoRemove the deprecate() macro from handy.h.
Abigail [Wed, 23 Nov 2016 22:03:13 +0000 (23:03 +0100)]
Remove the deprecate() macro from handy.h.

Since we now require each deprecation message to come with a
version in which the feature will disappear, and we have reworked
the existing uses of this macro, there doesn't seem to be a need
for this one anymore.

7 years agoJumping into constructs will be fatal in 5.28.
Abigail [Wed, 23 Nov 2016 21:52:36 +0000 (22:52 +0100)]
Jumping into constructs will be fatal in 5.28.

7 years agoUse of comma-less variable lists is deprecated.
Abigail [Wed, 23 Nov 2016 18:38:15 +0000 (19:38 +0100)]
Use of comma-less variable lists is deprecated.

It will be fatal by Perl 5.28.

7 years agoUse of Unicode code points exceeding IV_MAX will be fatal in Perl 5.28
Abigail [Wed, 23 Nov 2016 18:06:51 +0000 (19:06 +0100)]
Use of Unicode code points exceeding IV_MAX will be fatal in Perl 5.28

Changed the warning to reflect the deadline of this deprecation.
Update tests, perldiag.pod and added a section to perldeprecation.pod.

7 years agoUnescaped left braces in regular expressions will be fatal in 5.30.
Abigail [Mon, 21 Nov 2016 21:38:32 +0000 (22:38 +0100)]
Unescaped left braces in regular expressions will be fatal in 5.30.

In 5.26, some uses of unescaped left braces were made fatal; they have
given a deprecation warning since 5.20. Due to an oversight, some cases
were missed, and did not give a deprecation warning. They do now.

This patch changes said deprecation warning to mention the Perl version
in which the use of an unescaped left brace will be fatal (5.30).

The patch also cleans up some unnecessary quotes inside a C<> construct
in the discussion of this warning in perldiag.pod.

7 years agoBare heredocs will be fatal in 5.28.
Abigail [Fri, 18 Nov 2016 17:33:19 +0000 (18:33 +0100)]
Bare heredocs will be fatal in 5.28.

Heredocs without a terminator after the << have been deprecated
since 5.000. After more than 2 decades, it's time to retire this
construct. They will be fatal in 5.28.

7 years agoUse of \N{} will be fatal in 5.28.
Abigail [Fri, 18 Nov 2016 16:41:44 +0000 (17:41 +0100)]
Use of \N{} will be fatal in 5.28.

Use of \N{} in a double quoted context, with nothing between the
braces, was deprecated in 5.24, and it will be a fatal error in 5.28.

7 years agoReformat overlong comment.
Abigail [Fri, 18 Nov 2016 13:56:56 +0000 (14:56 +0100)]
Reformat overlong comment.

pod/perlhack.pod says to try hard not to exceed 79 columns.

7 years ago$/ = \-1 will be fatal in Perl 5.28.
Abigail [Fri, 18 Nov 2016 13:52:18 +0000 (14:52 +0100)]
$/ = \-1 will be fatal in Perl 5.28.

Setting $/ to a reference of a non-positive integer has been deprecated
since 5.20, in which it was special cased to act like you had set to
$/ to undef.

In Perl 5.28, setting $/ to a reference to a non-positive integer will
be a fatal error.

7 years agoOpening a file and dir using the same symbol will be fatal in 5.28.
Abigail [Thu, 17 Nov 2016 18:34:37 +0000 (19:34 +0100)]
Opening a file and dir using the same symbol will be fatal in 5.28.

Perl 5.10 deprecated using the same symbol to open both a filehandle
and a dirhandle, as this can lead to confusing code.

In Pelr 5.28, this will become a fatal error. This patch changes the
warning to reflect this.

7 years agoFix mentioning of C<$#>.
Abigail [Wed, 16 Nov 2016 23:38:38 +0000 (00:38 +0100)]
Fix mentioning of C<$#>.

A copy and past left a C<$*> instead of a C<$#>.

Pointed out by douglas steinwand.

7 years agoSetting ${^ENCODE} will be fatal by 5.28.
Abigail [Wed, 16 Nov 2016 18:07:32 +0000 (19:07 +0100)]
Setting ${^ENCODE} will be fatal by 5.28.

Hence, we adapted the warning, to mention the version in which it
will become a fatal error.

7 years agoBe consistent when addressing Perl.
Abigail [Tue, 15 Nov 2016 23:20:31 +0000 (00:20 +0100)]
Be consistent when addressing Perl.

In perldeprecation.pod, when referring to a particular perl version,
use "Perl 5.XX" (or "Perl 5.00X" for pre-5.6 versions) consistently.

7 years agoRemove deprecation warnings related to $* and $#.
Abigail [Tue, 15 Nov 2016 22:51:53 +0000 (23:51 +0100)]
Remove deprecation warnings related to $* and $#.

The magic variables $* and $# were deprecated in 5.000. Their magical
meaning was removed in Perl 5.10. Since then, a warning was issued
if the variables were used.

This warnings has been removed.

7 years agoTime limit the deprecation of :unique and :locked.
Abigail [Tue, 15 Nov 2016 18:35:28 +0000 (19:35 +0100)]
Time limit the deprecation of :unique and :locked.

The :unique and :locked attributes have had no effect since 5.8.8
and 5.005 respectively. They were deprecated in 5.12. They are now
scheduled to be deleted in 5.28.

There are two places the deprecation warning can be issued:
in lib/attributes.pm, and in toke.c. The warnings were phrased
differently, but since we're changing the warning anyway (as we
added the version of Perl in which the attributes will disappear),
we've used the same phrasing for this warning, regardless of where
it is generated:

    Attribute "locked" is deprecated, and will disappear in Perl 5.28
    Attribute "unique" is deprecated, and will disappear in Perl 5.28

7 years agoDrop .0 from version numbers.
Abigail [Mon, 14 Nov 2016 18:13:29 +0000 (19:13 +0100)]
Drop .0 from version numbers.

Since most perl versions we will refer to in this document will be
major releases, we'll drop the trailing ".0" whenever we mention
a version.

7 years agoActively deprecate File::Glob::glob().
Abigail [Mon, 14 Nov 2016 18:08:12 +0000 (19:08 +0100)]
Actively deprecate File::Glob::glob().

This function has been deprecated since 5.8. However, no deprecation
message was issued; only perl5.008delta.pod and a comment in the file
mention its deprecation.

This patch issues a deprecation message, and warns the user it will
be gone in perl 5.30. Since all this method does is calling
File::Glob::bsd_glob anyway, code calling this is easily fixed.

7 years agoMove discussion of using tie and friends on * less scalars which hold globs
Abigail [Mon, 14 Nov 2016 16:26:42 +0000 (17:26 +0100)]
Move discussion of using tie and friends on * less scalars which hold globs

This was deprecated in 5.14, and fixed in 5.16. Hence, it's moved out
of pod/perldiag.pod, and added to pod/perldeprecation.pod.

7 years agoRemoved entry "Setting ${^ENCODING} is deprecated"
Abigail [Mon, 14 Nov 2016 15:16:49 +0000 (16:16 +0100)]
Removed entry "Setting ${^ENCODING} is deprecated"

pod/perldiag.pod mentions twice that the use of ${^ENCODING} is deprecated.
This is overkill, and we've removed the entry which uses wording which is
no longer used.

7 years agoDeprecated POSIX functions were removed in 5.24.0
Abigail [Mon, 14 Nov 2016 15:12:12 +0000 (16:12 +0100)]
Deprecated POSIX functions were removed in 5.24.0

Therefore, we no longer need the entry in pod/perldiag.pod. We
do however need an entry in pod/perldeprecation.pod.

7 years agoCreated pod/perldeprecation.pod
Abigail [Mon, 14 Nov 2016 13:35:00 +0000 (14:35 +0100)]
Created pod/perldeprecation.pod

This pod is intended to document all deprecations in Perl.
It will document when something became deprecated, when it is
scheduled to be actually removed, and it will offer alternatives.

Initially, we documented the undeprecation of *glob{FILEHANDLE},
and removed its entry from pod/perldiag.pod where it was left
after it being no longer deprecated.

7 years agoperluniintro: Remove obsolete text
Karl Williamson [Mon, 16 Jan 2017 18:00:12 +0000 (11:00 -0700)]
perluniintro: Remove obsolete text

This refers to future plans about 5.24; 5.24 no longer is in the future.

7 years ago(perl #130262) split scalar context stack overflow fix
Tony Cook [Mon, 5 Dec 2016 00:48:14 +0000 (11:48 +1100)]
(perl #130262) split scalar context stack overflow fix

pp_split didn't ensure there was space for its return value
in scalar context.

7 years agoCorrect spelling error.
James E Keenan [Sun, 15 Jan 2017 00:07:21 +0000 (19:07 -0500)]
Correct spelling error.

7 years agoUse File::Spec->catfile() in Test2's Files.t test.
Craig A. Berry [Sat, 14 Jan 2017 21:44:15 +0000 (15:44 -0600)]
Use File::Spec->catfile() in Test2's Files.t test.

Explicitly using forward slashes to concatenate filenames is not
portable and we've already loaded File::Spec anyway.  Also, don't
try to remove the directory we're cleaning up unless we were
successful in opening it.

7 years agoDon't escape tilde when converting to VMS filespecs.
Craig A. Berry [Sat, 14 Jan 2017 20:44:15 +0000 (14:44 -0600)]
Don't escape tilde when converting to VMS filespecs.

There is only one use case for requiring a tilde to be escaped,
and that is when it is the first character in a file or directory
component and is *not* an indication of a special shell expansion
such as the user's home directory.  This scenario simply can't
come up when translating a Unix-format path to VMS format, so
there is nothing to be gained by escaping.

Escaping things we don't need to runs afoul of other goofy things
people do with filenames.  Test2 encodes data in tilde-delimited
temporary filenames and uses a naive join and split to manipulate
the components.  Adding a caret escape to each component is a
data corruption in this scheme, and this patch fixes test failures
in Test2 without any changes to that module.

7 years ago5.22.3 and 5.24.1 are done
Steve Hay [Sat, 14 Jan 2017 21:45:13 +0000 (21:45 +0000)]
5.22.3 and 5.24.1 are done
5.22.4 and 5.24.2 are imminent

7 years agoImport perldeltas from 5.22.3 and 5.24.1
Steve Hay [Sat, 14 Jan 2017 21:30:59 +0000 (21:30 +0000)]
Import perldeltas from 5.22.3 and 5.24.1

7 years agoImport Module::CoreList data for 5.22.3 and 5.24.1
Steve Hay [Sat, 14 Jan 2017 21:26:35 +0000 (21:26 +0000)]
Import Module::CoreList data for 5.22.3 and 5.24.1

7 years agoAdd epigraphs for 5.22.3 and 5.24.1
Steve Hay [Sat, 14 Jan 2017 20:44:45 +0000 (20:44 +0000)]
Add epigraphs for 5.22.3 and 5.24.1

7 years ago5.22.3 and 5.24.1 today
Steve Hay [Sat, 14 Jan 2017 18:08:39 +0000 (18:08 +0000)]
5.22.3 and 5.24.1 today

7 years ago[perl #130546] Restore delete-scalar-slice warning
Father Chrysostomos [Fri, 13 Jan 2017 06:17:04 +0000 (22:17 -0800)]
[perl #130546] Restore delete-scalar-slice warning

Commit v5.19.3-506-g429a25554a reduced false positives with the annoy-
ing ‘Scalar value such-and-such better written as such-and-such’ warn-
ing by flagging the op in the lexer (instead of warning immediately),
and then checking the op tree later, in order to avoid false positives
with perfectly valid constructs, such as qw"...".

The new code that checked the op tree looked for hslice and aslice
ops, but in the particular case of delete @a{...} and delete @a[...],
the slice op gets nulled and the delete op takes care of the slicing
operation (if you can call it that) itself.  The result was that the
warning disappeared altogether for delete.

This commit makes op.c check also for nulled hslice and aslice ops,
and applies the same heuristics to them as to unnulled slicing ops.

7 years agore.pm: pod formatting nits, and clarifications
Karl Williamson [Tue, 10 Jan 2017 17:31:29 +0000 (10:31 -0700)]
re.pm: pod formatting nits, and clarifications

7 years agoWarn on unescaped /[]}]/ under re strict
Karl Williamson [Fri, 6 Jan 2017 05:03:35 +0000 (22:03 -0700)]
Warn on unescaped /[]}]/ under re strict

This commit generates a warning when the experimental 're strict'
feature is in effect for unescaped '}' and ']' characters (in a regular
expression pattern) that are interpreted literally.

This brings the behavior of these more in line with ')' which croaks
when it is taken literally.

The problem with the existing behavior is that these characters may be
metacharacters or they may be literals, depending on action at a
distance.  Not so with ')', which is always a metacharacter unless
escaped.

Ideally, all three of these characters should behave similarly, but it
really is too late for that, except we can warn if the user has
requested extra checking of their patterns with this experimental
're strict' feature.

7 years agot/re/reg_mesg.t: Add new ability
Karl Williamson [Fri, 6 Jan 2017 04:51:12 +0000 (21:51 -0700)]
t/re/reg_mesg.t: Add new ability

This now allows one to say that a warning message is to be expected if
and only if 'use re "strict"' is on.

7 years agoVarious .t's: Escape literal '}' and ']' in patterns
Karl Williamson [Tue, 10 Jan 2017 18:09:33 +0000 (11:09 -0700)]
Various .t's: Escape literal '}' and ']' in patterns

It is clearer to show that these characters which are sometimes meta and
sometimes literal are meant to be taken literally here.

7 years agoregcomp.c: Clarify comment.
Karl Williamson [Fri, 6 Jan 2017 02:28:38 +0000 (19:28 -0700)]
regcomp.c: Clarify comment.

7 years agoAdd /xx regex pattern modifier
Karl Williamson [Thu, 12 Jan 2017 18:07:47 +0000 (11:07 -0700)]
Add /xx regex pattern modifier

This was first proposed in the thread starting at
http://www.nntp.perl.org/group/perl.perl5.porters/2014/09/msg219394.html

7 years agoperlre: Clarifications, typos
Karl Williamson [Fri, 13 Jan 2017 18:17:25 +0000 (11:17 -0700)]
perlre: Clarifications, typos

7 years agoperlretut: Add some white space for legibility
Karl Williamson [Wed, 11 Jan 2017 02:10:58 +0000 (19:10 -0700)]
perlretut: Add some white space for legibility

7 years agoregcomp.c: Remove obsolete data structure element
Karl Williamson [Thu, 12 Jan 2017 05:18:53 +0000 (22:18 -0700)]
regcomp.c: Remove obsolete data structure element

This was used for the removed feature of having the source in a
different encoding.

7 years agopp_sys.c: White space only
Karl Williamson [Fri, 13 Jan 2017 04:05:35 +0000 (21:05 -0700)]
pp_sys.c: White space only

Vertically align some components of an 'if' for readability.

7 years agoWrite tests for RT #77934.
James E Keenan [Thu, 12 Jan 2017 22:15:30 +0000 (17:15 -0500)]
Write tests for RT #77934.

Assistance with test provided by Jerry Hedden.

7 years agoRmv unused regex implementation structure element
Karl Williamson [Wed, 11 Jan 2017 21:21:16 +0000 (14:21 -0700)]
Rmv unused regex implementation structure element

7 years agoPATCH: [perl #130530]: HP-UX assertion failure
Karl Williamson [Mon, 9 Jan 2017 22:40:54 +0000 (15:40 -0700)]
PATCH: [perl #130530]: HP-UX assertion failure

This was introduced in a1a5ec35e6a3df0994b103aadb28a8c1a3a278da, and was
due to a thinko on my part.  Zefram figured it out.

A macro evaluating to a string constant returns an instance of that
constant.  Compilers are free to collapse all instances into a single
one (which saves space), or to have multiple copies.  The code was
assuming the former, and HP-UX cc doesn't.

The passed size also was one byte larger than it should have been.

7 years ago[perl #130522] test cases for len(STCLASS) > len(target)
Hugo van der Sanden [Mon, 9 Jan 2017 16:46:11 +0000 (16:46 +0000)]
[perl #130522] test cases for len(STCLASS) > len(target)

7 years ago[perl #130522] don't try to find_by_class outside the string
Hugo van der Sanden [Sun, 8 Jan 2017 14:59:36 +0000 (14:59 +0000)]
[perl #130522] don't try to find_by_class outside the string

If the calculated latest start position to try is before our current
start position, stop immediately: else we can read out of bounds,
and end up doing unnecessary work.

7 years ago[perl #130522] do not allow endpos to exceed strend
Hugo van der Sanden [Sun, 8 Jan 2017 14:54:57 +0000 (14:54 +0000)]
[perl #130522] do not allow endpos to exceed strend

Check substrings can come from lookaheads, so their length can exceed
minlen. Use a clamped variant of HOP3c to avoid a bad endpos in this case.

7 years ago(perl #130534) fix test failures under DragonFly BSD
Tomasz Konojacki [Tue, 10 Jan 2017 02:47:51 +0000 (03:47 +0100)]
(perl #130534) fix test failures under DragonFly BSD

7 years agoAdd Tomasz Konojacki to AUTHORS
Karl Williamson [Tue, 10 Jan 2017 19:34:52 +0000 (12:34 -0700)]
Add Tomasz Konojacki to AUTHORS

7 years agot/loc_tools.pl: Quit immediately if incompat locale
Karl Williamson [Tue, 10 Jan 2017 18:38:34 +0000 (11:38 -0700)]
t/loc_tools.pl: Quit immediately if incompat locale

The design of this was to not continue when presented with a locale that
we have discovered is incompatible with Perl.  Instead it was soldiering
on.  Those incompatibilities could cause segfaults, etc if the libc
isn't fully protected against unexpected input.

7 years agot/loc_tools.pl: Allow for multiple warnings
Karl Williamson [Tue, 10 Jan 2017 18:35:05 +0000 (11:35 -0700)]
t/loc_tools.pl: Allow for multiple warnings

This code searched the first warning for particular patterns.  It really
should search all warnings for complete correctness.

7 years agot/loc_tools.pl: Emphasize input conditions in comment
Karl Williamson [Tue, 10 Jan 2017 18:33:32 +0000 (11:33 -0700)]
t/loc_tools.pl: Emphasize input conditions in comment

7 years agolocale.c: Fix typo in comment
Karl Williamson [Tue, 10 Jan 2017 18:32:53 +0000 (11:32 -0700)]
locale.c: Fix typo in comment

7 years agolocale.c: -DL shouldn't affect other things
Karl Williamson [Tue, 10 Jan 2017 18:31:01 +0000 (11:31 -0700)]
locale.c: -DL shouldn't affect other things

Prior to this commit, -DL would cause a message to be suppressed
elsewhere.  Code could be relying on that message being output in the
expected place.

7 years agoperldelta for 95309d6ba0f3
Tony Cook [Mon, 9 Jan 2017 00:09:50 +0000 (11:09 +1100)]
perldelta for 95309d6ba0f3

7 years agoadd build options to disable the PERL_HASH* and PERL_PERTURB_KEYS env vars
Tony Cook [Thu, 8 Dec 2016 03:14:11 +0000 (14:14 +1100)]
add build options to disable the PERL_HASH* and PERL_PERTURB_KEYS env vars

These variables either control or reveal information used in perl's
hash implementation that a careful user may not want controlled or
exposed.