This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Nicolas R [Tue, 21 Nov 2017 22:58:14 +0000 (15:58 -0700)]
Bump Carp to version 1.45
Previous Carp update from
915a6810d3 was merged
after 5.27.6 release... so we need to bump
the release version.
Karen Etheridge [Tue, 21 Nov 2017 22:43:04 +0000 (14:43 -0800)]
fix wordwrapping on generated acknowledgements text
experimentation reveals that 77 chars is just sufficient to produce
output such that gmail will not re-wrap the text and make release
announcements dreadfully ugly.
Karen Etheridge [Tue, 21 Nov 2017 22:42:48 +0000 (14:42 -0800)]
add link to announcement email
J. Nick Koston [Thu, 12 Oct 2017 06:57:36 +0000 (01:57 -0500)]
Carp: optimize format_arg when arguments contain many references
RT #132274
This is a very minimal patch after RT discussion.
When using the CPAN version of UNIVERSAL::isa we cannot
use UNIVERSAL::isa on Carp without taking the risk of
going into one infinite loop.
As UNIVERSAL::isa on CPAN is the only one to advertise
a VERSION, we can use this value to disable the UNIVERSAL
check.
Note version bump is not required as it already occurred
since v5.27.5 release.
Signed-off-by: Nicolas R <atoomic@cpan.org>
Sawyer X [Tue, 21 Nov 2017 14:12:04 +0000 (15:12 +0100)]
Fix release schedule
Sullivan Beck [Fri, 17 Nov 2017 15:59:43 +0000 (10:59 -0500)]
Bump Locale-Codes from 3.54 to 3.55
Includes perldelta entry noting its deprecation in core.
Zefram [Tue, 21 Nov 2017 09:32:09 +0000 (09:32 +0000)]
update newGIVENOP() doc for loss of lexical $_
Steve Hay [Tue, 21 Nov 2017 08:46:18 +0000 (08:46 +0000)]
Update META.json for JSON::PP update
Steve Hay [Tue, 21 Nov 2017 08:29:53 +0000 (08:29 +0000)]
Module::CoreList 5.
20171120 is now on CPAN
Steve Hay [Tue, 21 Nov 2017 08:29:00 +0000 (08:29 +0000)]
Upgrade JSON::PP from version 2.94 to 2.97000
Steve Hay [Tue, 21 Nov 2017 08:26:22 +0000 (08:26 +0000)]
Upgrade Test::Simple from version 1.302111 to 1.302113
Steve Hay [Tue, 21 Nov 2017 08:18:21 +0000 (08:18 +0000)]
Upgrade Unicode::Collate from version 1.23 to 1.24
Dagfinn Ilmari Mannsåker [Tue, 21 Nov 2017 00:03:26 +0000 (00:03 +0000)]
Fix Ask Bjørn Hansen's name in perl5276delta
The AUTHORS file had it wrong (see previous commit) when the perldelta
was generated.
Dagfinn Ilmari Mannsåker [Mon, 20 Nov 2017 23:34:12 +0000 (23:34 +0000)]
Fix Ask Bjørn Hansen's AUTHORS entry
It was originally added incorrectly with an ö in commit
3c975e43, and
when the file was recoded from ISO-8859-1 to UTF-8 in commit
055f8557 it
got further mangled to öe.
Karen Etheridge [Mon, 20 Nov 2017 23:41:01 +0000 (15:41 -0800)]
fix formatting in earlier epigraph
Karen Etheridge [Mon, 20 Nov 2017 02:36:22 +0000 (18:36 -0800)]
misc small amendments to the RMG
Karen Etheridge [Sun, 19 Nov 2017 23:30:52 +0000 (15:30 -0800)]
minor updates to perldelta template
Karen Etheridge [Mon, 20 Nov 2017 01:56:29 +0000 (17:56 -0800)]
keep version ordering consistent
Karen Etheridge [Mon, 20 Nov 2017 22:49:24 +0000 (14:49 -0800)]
remove bz2 option from release template
Karen Etheridge [Mon, 20 Nov 2017 23:32:18 +0000 (15:32 -0800)]
generate preliminary Module::CoreList updates for 5.27.7
Karen Etheridge [Mon, 20 Nov 2017 23:16:15 +0000 (15:16 -0800)]
Bump the perl version in various places for 5.27.7
Karen Etheridge [Mon, 20 Nov 2017 23:11:32 +0000 (15:11 -0800)]
new perldelta for 5.27.7
Karen Etheridge [Mon, 20 Nov 2017 23:04:14 +0000 (15:04 -0800)]
tick off release 5.27.6
Karen Etheridge [Mon, 20 Nov 2017 23:03:12 +0000 (15:03 -0800)]
commit epigraph for release 5.27.6
Karen Etheridge [Mon, 20 Nov 2017 02:23:34 +0000 (18:23 -0800)]
add new release to perlhist
Karen Etheridge [Mon, 20 Nov 2017 02:22:20 +0000 (18:22 -0800)]
finalize perldelta for 5.27.6
Karen Etheridge [Mon, 20 Nov 2017 02:32:31 +0000 (18:32 -0800)]
perldelta: update updated modules
Karen Etheridge [Mon, 20 Nov 2017 02:12:51 +0000 (18:12 -0800)]
Update Module::CoreList for 5.27.6
Karen Etheridge [Sun, 19 Nov 2017 23:29:12 +0000 (15:29 -0800)]
perldelta updates for 5.27.6
- remove template notes
- add items not mentioned before
- key highlights of updated modules
- changes to supported platforms
- perlbug enhancements
- perldiag's removal of diag corresponding to experimental::lexical_topic
- "Allow sub-in-stash outside of main" change actually happened in 5.27.5
- added a few RT#s to existing entries
- misc markup and spelling fixes
Karen Etheridge [Mon, 20 Nov 2017 01:18:31 +0000 (17:18 -0800)]
add missing section on sub typeglobs to perl275delta
David Mitchell [Mon, 20 Nov 2017 15:19:59 +0000 (15:19 +0000)]
MULTICONCAT - use distinct TMPS for const overload
Because OP_MULTICONCAT optimises away any const SVs, they have to be
recreated if a concat overload method is called. Up until now (for
efficiency) the same SvTEMP was used to create each const TEMP. This
caused problems if an overload method saved a ref to the argument.
This is easily fixed by not reusing the TEMP (and the extra inefficiency
is small compared to the overall burden of calling out to an overloaded
method).
With this patch, the following test code changes from getting "BB" to
getting "AB":
my @a;
use overload '.' => sub { push @a, \$_[1]; $_[0] };
my $o = bless [];
my $x = $o . "A" . $o . 'B';
is "${$a[0]}${$a[2]}", "AB", "RT #132385";
Karen Etheridge [Mon, 20 Nov 2017 04:55:30 +0000 (20:55 -0800)]
-b option in makerel was removed
Karen Etheridge [Sun, 19 Nov 2017 23:37:07 +0000 (15:37 -0800)]
add perldelta for packaging changes
=?UTF-8?q?Ask=20Bj=C3=B8rn=20Hansen?= [Tue, 31 Oct 2017 15:39:21 +0000 (08:39 -0700)]
Removed bzip option from makerel
xz compresses better and decompresses faster, gzip is still more
compatible and uses less memory. In the recent years we've
archived perl as both gzip, bzip2 and xz which doesn't make much
sense. This is a followup to
f276fdad.
closes [perl #132381].
Karen Etheridge [Sun, 19 Nov 2017 22:34:56 +0000 (14:34 -0800)]
fix spelling
Karen Etheridge [Sun, 19 Nov 2017 18:46:26 +0000 (10:46 -0800)]
bump threads version to account for previous changes to comments and tests
Zefram [Sun, 19 Nov 2017 09:15:53 +0000 (09:15 +0000)]
fix tainting of s/// with overloaded replacement
The substitution code was trying to track the taintedness of the
replacement string itself, but it didn't account for the replacement
being an untainted object with overloading that returns a tainted
stringification. It looked at the taintedness of the object value, not
realising that taint could arise during the string concatenation per se.
Change the taint checks to look at the actual TAINT_get flag after string
concatenation. This may falsely ascribe to the replacement taint that
actually came from somewhere else, but the end result is the same anyway:
there's no visible behaviour that distinguishes taint specifically from
the replacement. Also remove a related taint check that seems to be
not needed at all. Fixes [perl #115266].
Karen Etheridge [Sun, 19 Nov 2017 04:06:35 +0000 (20:06 -0800)]
fix other pod versions that had become out of date, and add reminder comments
Karen Etheridge [Sun, 19 Nov 2017 03:57:57 +0000 (19:57 -0800)]
fix Attribute::Handlers pod to match new $VERSION
..as the comment next to the $VERSION declaration reminds us to do
Karl Williamson [Sun, 19 Nov 2017 02:44:47 +0000 (19:44 -0700)]
perldelta for perluniprops change
For commit
9b79e9e3431d11e79a4f85268f70130b7b4369f6
Karl Williamson [Sat, 18 Nov 2017 23:50:48 +0000 (16:50 -0700)]
locale.c: Use computed length for U+10FFFF
The previous commit calculates this and placed the result in a header
file. This now uses the calculated value instead of a hard-coded "4",
which is incorrect on EBCDIC platforms.
Karl Williamson [Sat, 18 Nov 2017 23:43:40 +0000 (16:43 -0700)]
regen/unicode_constants.pl: Add U+10FFFF entry
We need the length of the UTF-8 for this code point elsewhere, and it
is different between ASCII and EBCDIC.
James E Keenan [Sat, 18 Nov 2017 20:48:18 +0000 (15:48 -0500)]
Sync cpan/Test-Simple with CPAN version 1.302111.
James E Keenan [Sat, 18 Nov 2017 20:33:32 +0000 (15:33 -0500)]
Upstream has released Test-Simple with new t/Legacy/Tester/tbt_09do.t.
Since that now matches what we have in blead, we no longer need to have a
CUSTOMIZED entry in Porting/Maintainers.pl.
Aaron Crane [Sat, 18 Nov 2017 18:07:23 +0000 (18:07 +0000)]
Restore ability to build on platforms without snprintf()
C89 does not in fact define snprintf() or vsnprintf(), and we must therefore
probe for the existence of those functions before trying to use them.
khw++ for pointing out my earlier error.
This reverts part or all of each of the following commits:
13d66b05c6163c3514774d3d11da5f3950e97e98 Rely on C89 vsnprintf()
e791399041815a1a45cea3c7f277c7045b96e51b Rely on C89 snprintf()
adf7d503e55721c500f0bf66560b8f5df7966fe7 pod/perlhacktips.pod: remove some outdated portability notes
Aaron Crane [Sat, 18 Nov 2017 16:37:44 +0000 (16:37 +0000)]
Porting/checkcfgvar.pl: add missing config-symbol file
Cross/config.sh-arm-linux-n770 should probably have been added to the list
of config-symbol files when it was first added, and the fact that it wasn't
means that there are many symbols it doesn't list. In the absence of any
better information, I've defaulted them to the Cross/config.sh-arm-linux
values.
Aaron Crane [Sat, 18 Nov 2017 15:51:12 +0000 (15:51 +0000)]
Regenerate Porting/Glossary
Aaron Crane [Sat, 18 Nov 2017 15:47:00 +0000 (15:47 +0000)]
Regenerate sample config files
Aaron Crane [Sat, 18 Nov 2017 13:40:50 +0000 (13:40 +0000)]
Rebuild Configure from current metaconfig
Commit
46857622bdd8fff9558b66485f86ae4eb019ec55 of the metaconfig repo
reverts to the upstream version of i_sysmman.U, which has a slightly
different comment.
Karl Williamson [Sat, 18 Nov 2017 16:35:25 +0000 (09:35 -0700)]
PATCH: [perl #132463] perluniprops for \p{Word}
perluniprops was not updated to reflect the changes made to what
\p{Word} contains as of 5.18. What was added was the code points that
have the Join_Control property, which, so far, only contain U+200C and
U+200D. This commit uses Join Control instead of the hard-coded code
point numbers, so that when Unicode changes it, it automatically will
still be valid.
Thanks for spotting this.
Zefram [Fri, 17 Nov 2017 14:08:11 +0000 (14:08 +0000)]
fix perldelta formatting
Documentation changes get =items, not =head3s.
Zefram [Fri, 17 Nov 2017 14:05:49 +0000 (14:05 +0000)]
clarify perlop description of binary "x"
[perl #132460]
Zefram [Fri, 17 Nov 2017 09:03:46 +0000 (09:03 +0000)]
restore deparsing style for \&foo
When deparsing a reference to a sub in the current package, other than in
a call expression, with "use strict 'vars'" in effect and no lexical sub
of the same name in scope, commit
dd6661605fe0a54c602f2e55f875acfdcd330b79
accidentally changed the deparsing from "&main::foo" to "&foo".
Both deparsings are correct, and the short one arguably preferable.
In fact, the deparsing was originally of the short form, but changed to
the long form (probably accidentally) in Perl 5.21.7, when the deparser
started adding the package to distinguish package subs from lexical subs
of the same name. Nevertheless, it was not the intention to change this
output in that edit, and it broke a CPAN module's tests. Consequently,
this commit restores the long-form deparsing in this case.
Zefram [Fri, 17 Nov 2017 05:28:21 +0000 (05:28 +0000)]
rip out quicksort and sort algorithm control
[perl #119635]
Karl Williamson [Fri, 17 Nov 2017 05:28:49 +0000 (22:28 -0700)]
embed.fnc: Add X flag to newly private UTF16 fcns
The E flag added in
cfd95a374972942cba5e8afc019dc6019815b45c needs
either the X flag or be private to its containing file.
Spotted by Craig Berry.
Father Chrysostomos [Fri, 17 Nov 2017 04:07:27 +0000 (20:07 -0800)]
Suppress warning in XS-APItest’s sniscow.t
Zefram [Fri, 17 Nov 2017 03:26:47 +0000 (03:26 +0000)]
correctly error on -k "nonexistent" on Windows
The file test operators for Unix permission bits were returning a blanket
false result on systems where the bit being tested for doesn't exist.
That's a sensible way to treat a nonexistent bit when statting a file,
but the false result was being returned without checking that the argument
actually refers to a file. Remove the pre-stat checks for nonexistent
bits, so that we get the correct errors for non-files. We still get a
blanket false result for nonexistent bits on files.
Craig A. Berry [Thu, 16 Nov 2017 21:01:56 +0000 (15:01 -0600)]
Portability fix for Test::Simple 'do' test.
Prepending './' to what might not be a Unix filespec can't be
relied on to work (and it definitely doesn't on VMS). So use the
functions File::Spec provides to do this portably.
N.B. File::Spec->catfile() is smart enough not to prepend the
value of curdir() if it's already there.
Karl Williamson [Wed, 15 Nov 2017 04:41:25 +0000 (21:41 -0700)]
Remove UTF16 functions from public access
See thread starting at
http://nntp.perl.org/group/perl.perl5.porters/247120
I don't believe this needs a perldelta, as the functions weren't
documented, hence are not supposed to be used, and in fact are not used
in cpan.
Yves Orton [Wed, 15 Nov 2017 21:27:19 +0000 (22:27 +0100)]
precise control over order tests are run in TEST
Yves Orton [Wed, 15 Nov 2017 21:26:48 +0000 (22:26 +0100)]
handy.h: add a comment about perl_assert_ptr()
Dagfinn Ilmari Mannsåker [Thu, 16 Nov 2017 16:09:27 +0000 (16:09 +0000)]
Use strict and warnings in stat.t
Either one would have caught the error fixed by the previous commit.
Dagfinn Ilmari Mannsåker [Thu, 16 Nov 2017 16:08:43 +0000 (16:08 +0000)]
Fix $$ variable usage in stat.t
"$$_TEST" gets parsed as "${$_TEST}", which evaluates to the empty
string, because this test uses neither strict nor warnings.
Craig A. Berry [Thu, 16 Nov 2017 15:08:33 +0000 (09:08 -0600)]
Use safer symlink name in stat.t.
The file pattern TEST.symlink.$$ is an ambiguous filename on VMS
because the digits of the $$ could be construed as a version
number or as part of the filename proper, depending on various
environmental settings. This would not cause stat.t to fail but
could prevent removal of the symlink. Which would then cause
ext/File-Glob/t/basic.t to fail because it scans the t/ directory
for files match TES* and falls down when it finds files it does
not expect.
In principle this could cause trouble for parallel tests on any
platform if stat.t's detritus happens to be present while the
File::Glob tests are running.
Short of a major rethink of the test suite to stop tests from using
t/ as their personal playground, the safest bet seems to be to use
a filename that is unambiguous on VMS and will not collide with
tests expecting t/TEST to be the only file in that directory that
begins with 'TES'.
Zefram [Thu, 16 Nov 2017 14:56:11 +0000 (14:56 +0000)]
fix lvalue context for 4-arg substr
4-arg substr uses its first arg as an lvalue, but wasn't lvaluifying
it properly. [perl #115258]
Karl Williamson [Thu, 16 Nov 2017 14:54:46 +0000 (07:54 -0700)]
I18N::Langinfo: Add note to pod
For the last several releases of Perl, the items listed in the note were
always those from the C locale, regardless of the real one. Before
that, it was even more buggy, whether you got the C locale or the real
one was complicated.
Zefram [Thu, 16 Nov 2017 11:01:34 +0000 (11:01 +0000)]
deparse trailing-colon barewords carefully
A bareword ending in "::" has one "::" suffix stripped upon parsing,
so when deparsing a glob name ending in "::" as a bareword it needs
another "::" added. But this only applies to barewords, not to glob
names that follow sigils, so the deparser needs to distinguish between
contexts for glob names in some places where it previously did not.
Fixes [perl #113716].
This change supersedes the recent change about deparsing glob names in
the CORE stash. Those glob names are now handled by suffixing "::",
and this suffix is only added in bareword contexts, making the handling
of the two unusual cases identical.
David Mitchell [Thu, 16 Nov 2017 09:32:41 +0000 (09:32 +0000)]
clarify the pod for Perl_utf8_length()
It seemed to imply that the bytes making up the char were s..e; they're
actually s..(e-1).
NPD
David Mitchell [Thu, 16 Nov 2017 09:23:53 +0000 (09:23 +0000)]
expand code comment in perly.y
ASSIGNOP includes mutators like += as well as basic assignment
NPD
Zefram [Thu, 16 Nov 2017 07:04:32 +0000 (07:04 +0000)]
deparse ::CORE::foo barewords carefully
A bareword such as "::CORE::foo", where it refers to a GV, is liable to be
confused with the "CORE::foo" syntax, which can't refer to a GV but is a
way of supplying a keyword, and is illegal if the keyword doesn't exist.
Make sure to deparse it with the "::" prefix. Fixes [perl #113714].
Zefram [Thu, 16 Nov 2017 06:51:32 +0000 (06:51 +0000)]
rip out CPAN-release cruft from B::Deparse
B::Deparse is distributed only with the core. It has no need to be
portable between Perl versions or to have its own change log.
Zefram [Thu, 16 Nov 2017 04:43:17 +0000 (04:43 +0000)]
additional tests for registered warning categories
Nicolas R [Wed, 15 Nov 2017 17:23:18 +0000 (11:23 -0600)]
IO::Handle - fix precedence issue
This commits fixes remarks raised
during the 2017 p5h in Amsterdam.
- fix precedence issue with '=~'
- stop using indirect new calls for SelectSaver.
Karen Etheridge [Sat, 4 Nov 2017 18:29:25 +0000 (11:29 -0700)]
spelling
Karen Etheridge [Wed, 1 Nov 2017 21:26:44 +0000 (14:26 -0700)]
tabs to spaces in RMG
Zefram [Wed, 15 Nov 2017 17:41:29 +0000 (17:41 +0000)]
fix handling of registered warning categories
There were some problems arising from some warning bitsets being shorter
than others, which happens when registration of a new warning category
makes new bitsets longer. Most obviously, if a scope used "use warnings
'all'" to turn on all warnings and then turned off some specific warnings,
then that scope wouldn't get warnings for subsequently-registered warning
categories, because its bitset doesn't extend to the bit controlling
the new category. (If just "use warnings 'all'" was used, without any
customisation, then a special hack made that work for new categories.)
It was also possible for a longer bitset to get truncated by a warnings
pragma, because the bitset editing code assumed that all bitsets are
the same length.
To fix this, first the warning bits for the "all" category have to change
meaning. Unlike all other warning categories, the bits for "all" used to
be set only when there were no warning categories disabled; disabling any
would also clear the "all" bits. That was supporting the special hack
mentioned above that the all-warnings bitset work for new categories.
This exception is now removed, so the meaning of the "all" bits is now the
more obvious meaning, of indicating the default treatment that the scope
wants for warnings not falling into any category known to the bitset.
In warnings::warnif() et al, if the caller's bitset is found to be too
short to have a bit for the relevant category, then the setting for the
"all" category is used instead.
Because the length of a bitset is an integral number of bytes, but
only two bits are used per category, the length of a bitset doesn't
precisely indicate which categories had been registered by the time it
was constructed. So the standard bitsets for the "all" category are
now always filled to their byte length, with bits set preemptively for
categories not yet registered that fall within the current bitset length.
When a warnings pragma operates on a bitset, it first expands it to the
preferred length, by duplicating the "all" bits for the categories covered
by the new length. It is careful to maintain the length when combining
the bitset with the standard bitsets for categories. When a bitset is
read from ${^WARNING_BITS} or from caller(), the standard pWARN_ALL
setting is no longer expanded by the core to $warnings::Bits{all},
because the core's short WARN_ALLstring will now be expanded correctly
just like any other bitset.
Fixes [perl #108778].
Steve Hay [Wed, 15 Nov 2017 18:17:17 +0000 (18:17 +0000)]
Provide option to build with -D__USE_MINGW_ANSI_STDIO
This commit adapts and extends a patch from sisyphus1@optusnet.com.au on
perl #130447.
Note for the future: One of the MinGW/gcc developers has said that
explicitly defining __USE_MINGW_ANSI_STDIO in this way is not guaranteed
to work in the future, so we may have to pursue other options instead one
day: https://rt.perl.org/Ticket/Display.html?id=130447#txn-1461711
However, we already do this for "nvtype=long double" builds and it's
working fine so far, so it seems acceptable to allow the same thing for
"nvtype=double" builds for now.
Nicolas R [Wed, 15 Nov 2017 16:04:29 +0000 (10:04 -0600)]
DynaLoader simplify parsing option rule
After review, comments & dumb benchmark.
Simply using a substitute for these two
'-L' and '-l' options parsing makes the code
easier to maintain.
The benchmark difference is pretty close, for
matching, non matching (short or long) strings.
Todd Rinaldo [Sat, 11 Nov 2017 05:01:27 +0000 (23:01 -0600)]
Remove use vars from B::Deparse
RT 132429: This causes a slight change to the output value of ${^WARNING_BITS} due to
warnings::register not polluting introspection for B::Deparse.
Steve Hay [Wed, 15 Nov 2017 17:27:38 +0000 (17:27 +0000)]
perldelta for commit
43b354f1e1
David Mitchell [Wed, 15 Nov 2017 15:25:08 +0000 (15:25 +0000)]
lib/perl5db.pl: don't dump argless args
dump_trace() prints a stack backtrace - including caller args - by using
caller() and @DB::args.
However, if a sub is called using the '&foo;' argless mechanism, caller()
doesn't populate @DB::args, so it continues to hold whatever it was set
to previously. This might include SVs which have since been freed or
re-allocated.
So only display args for a particular caller depth if that sub was called
with args.
This was causing smoke failures in lib/perl5db.t when TERM was unset.
It only started failing recently, due I guess to subtle changes in what
SVs were left hanging about in @DB::args from a previous use of caller().
See http://nntp.perl.org/group/perl.perl5.porters/247032
Subject: Smoke FAIL's for lib/perl5db.t
David Mitchell [Wed, 15 Nov 2017 15:19:51 +0000 (15:19 +0000)]
lib/perl5db.t: remove debugging code
A spurious printf was inadvertently added by me with
e05a85b2.
Steve Hay [Wed, 15 Nov 2017 14:07:42 +0000 (14:07 +0000)]
Improve cl version detection
Drop the use of the word "Version" so it works on non-English systems.
Instead, simply look for a number of the form X.Y (or X.Y.Z etc) with word
boundaries around it. Thus, we can find numbers like 12.00.8804 or
19.00.24213.1, but not accidentally pick up things like x86 or 1984-1998.
Also, drop the "--version" argument since it doesn't really exist and
causes warnings/errors to be output. A bare "cl" command suffices to get a
usage message including the version number to be output.
Finally, the Windows version detection can be similarly improved.
This fixes perl #132421.
Zefram [Wed, 15 Nov 2017 08:17:30 +0000 (08:17 +0000)]
perldelta for stat(CLOSED) fix
Zefram [Wed, 15 Nov 2017 08:11:37 +0000 (08:11 +0000)]
set $! when statting a closed filehandle
When a stat fails because it's on a closed or otherwise invalid
filehandle, $! was often not being set, depending on the operation
and the nature of the invalidity. Consistently set it to EBADF.
Fixes [perl #108288].
Karl Williamson [Wed, 15 Nov 2017 04:33:43 +0000 (21:33 -0700)]
POSIX.pod: Add cautions about locale use
Karl Williamson [Mon, 13 Nov 2017 05:29:58 +0000 (22:29 -0700)]
locale.c: Use mnemonic
Replace this number by an already existing mnemonic
Father Chrysostomos [Wed, 15 Nov 2017 02:58:12 +0000 (18:58 -0800)]
perldelta for the prev. commit
Father Chrysostomos [Wed, 15 Nov 2017 02:55:55 +0000 (18:55 -0800)]
[perl #132442] Fix stack with do {my sub l; 1}
A block in perl usually compiles to a leave op with an enter inside
it, followed by the statements:
leave
enter
nextstate
... expr ...
nextstate
... expr ...
If a block contains only one statement, and that statement is suffic-
iently innocuous, then the enter/leave pair to create the scope at run
time get skipped, and instead we have a simple scope op which is not
even executed:
scope
ex-nextstate
... expr ...
The nextstate in this case also gets nulled.
In the case of do { my sub l; 1 } we were getting a variation of the
latter, that looked like this:
scope
introcv
clonecv
nextstate
... expr ...
The problem here is that nextstate resets the stack, even though a new
scope has not been pushed, so we end up with all existing stack items
from the *outer* scope getting clobbered.
One can have fun with this and erase everything pushed on to the stack
so far in a given statement:
$ ./perl -le 'print join "-", 1..10, do {my sub l; ","}, 11..20'
11,12,13,14,15,16,17,18,19,20
Here I replaced the first argument to join() from within the do{}
block, after having cleared the stack.
Why was the op tree was getting muddled up like this? The ‘my sub’
declaration does not immediately add any ops to the op tree; those ops
get added when the current scope finishing compiling, since those ops
must be inserted at the beginning of the block.
I have not fully looked into the order that things happen, and why the
nextstate op does not get nulled; but it did not matter, because of
the simple fix: Treat lexical sub declarations as ‘not innocuous’ by
setting the HINT_BLOCK_SCOPE flag when a lexical sub is declared.
Thus, we end up with an enter/leave pair, which creates a
proper scope.
Sawyer X [Tue, 14 Nov 2017 20:44:28 +0000 (21:44 +0100)]
Update experimental.pm from 0.016 to 0.017
James E Keenan [Tue, 14 Nov 2017 19:26:35 +0000 (14:26 -0500)]
Paul Marquess [Tue, 14 Nov 2017 19:15:25 +0000 (14:15 -0500)]
Compress-Raw-Zlib: sync with CPAN version 2.075
https://rt.cpan.org/Ticket/Display.html?id=123245 reports a security
vulnerability in versions zlib 1.2.8 thru 1.2.10 of the zlib library. Zlib is
bundled with Compress-Raw-Zlib, so any vulnerability reappears once
Compress-Raw-Zlib is shipped with Perl 5. The vulnerability is present in
production releases up to and including perl-5.26.1.
To address this vulnerability, this commit upgrades us to the latest CPAN version.
David Mitchell [Tue, 14 Nov 2017 13:27:59 +0000 (13:27 +0000)]
OP_MULTICONCAT: fix AIX
The OP_MULTICONCAT work broke AIX builds because it turns out that
PerlMemShared_malloc() isn't safe (in the sense of safemalloc());
i.e. on AIX, PerlMemShared_malloc(0) returns NULL.
Steve Hay [Tue, 14 Nov 2017 14:06:28 +0000 (14:06 +0000)]
Upgrade libnet from version 3.10 to 3.11
This includes https://github.com/steve-m-hay/perl-libnet/pull/32
Steve Hay [Tue, 14 Nov 2017 14:01:33 +0000 (14:01 +0000)]
Fix Windows build failure introduced by
7d00a3405c
Craig A. Berry [Tue, 14 Nov 2017 13:13:19 +0000 (07:13 -0600)]
Handle empty list in Perl_vms_do_aexec.
Since
2fcab33080e this is now expected and tested for, so do
what other platforms do.
Zefram [Tue, 14 Nov 2017 13:14:14 +0000 (13:14 +0000)]
mv "Truth and Falsehood" from perlsyn to perldata
This one-paragraph section didn't belong in perlsyn. perldata already
had a paragraph on the topic; merge them. [perl #115650]
Zefram [Tue, 14 Nov 2017 12:56:35 +0000 (12:56 +0000)]
fix newPVOP() doc re freeing of pv
[perl #127697]
Aaron Crane [Tue, 14 Nov 2017 12:07:19 +0000 (12:07 +0000)]
perldelta: typo
Ilmari++
Aaron Crane [Tue, 14 Nov 2017 11:51:01 +0000 (11:51 +0000)]
perldelta: C89 requirement