This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Karl Williamson [Tue, 4 Feb 2020 21:43:14 +0000 (14:43 -0700)]
toke.c: Split code to load _charnames.pm into own fnc
This is in preparation for it being called from more than one place.
Karl Williamson [Tue, 4 Feb 2020 21:28:59 +0000 (14:28 -0700)]
toke.c: Change variable name, add one
This if for clarity as to what's going on, and to simplify some
expressions.
Karl Williamson [Fri, 31 Jan 2020 21:07:42 +0000 (14:07 -0700)]
toke.c: extract charnames code from S_new_constant
The code for dealing with charnames is intertwined and special cased in
S_new_constant. My guess is it was originally to offer customized,
better error messages when things go wrong. Much later the function was
changed so that a message could be returned instead of output, and the
code didn't really need the customization any longer. But by then
autoloading of charnames had been added when a \N[} was parsed, meaning
that more special casing was added instead, as that had been the logical
place to do it.
This commit extracts the special charnames handling to the one place it
is actually used, and the disentangled S_new_constant is then called.
This is in preparation for future commits, and makes the code cleaner.
This adds testing of the new syntax to lib/charnames.t. That file
randomly generates some tests, simply because there are too many names
to test reasonably at once. To compensate for the added tests, I
lowered the percentage per run of characters tested so that this file
takes about the same amount of time as before.
Karl Williamson [Wed, 12 Feb 2020 20:27:45 +0000 (13:27 -0700)]
lib/charnames.t: Add a couple of tests
These are problematic character names; test them always
Karl Williamson [Wed, 12 Feb 2020 22:02:46 +0000 (15:02 -0700)]
Remove claimed support for mbstowcs, wcstombc
As noted in perldelta, these functions could not have ever worked, and
there is no demand for them, hence no reason to make them work.
This fixes GH #17388
Dagfinn Ilmari Mannsåker [Wed, 12 Feb 2020 20:18:40 +0000 (20:18 +0000)]
Revert "pp_(get|set)priority: remove ancient glibc C++ workaround"
It turns out that even though the headers correctly define the argument
as `int` under C++, -Wc++-compat doesn't know this.
Add a comment to stop others from falling into the same trap I did.
This reverts commit
34d254cefc451e5ab438acf22a51d7b557c05a0e.
Karl Williamson [Tue, 11 Feb 2020 04:49:01 +0000 (21:49 -0700)]
perlreref: quantifier {,n} is now illegal
And has been for a while. Update the pod.
James E Keenan [Tue, 11 Feb 2020 13:29:29 +0000 (13:29 +0000)]
Additional email (github) address for Richard Leach
Correct two earlier formatting errors.
Richard Leach [Fri, 7 Feb 2020 22:01:25 +0000 (22:01 +0000)]
Tie::File - Document use of binmode on filehandles
Documentation fix for #17497, where the user passed a filehandle in, but the lack of binmode meant that the :crlf layer on Windows caused problems when the file was later used on Linux.
Todd Rinaldo [Fri, 31 Jan 2020 05:02:51 +0000 (23:02 -0600)]
Make Tie::File distro conform to strict and warnings.
Fixes #17495
Todd Rinaldo [Mon, 3 Feb 2020 17:34:14 +0000 (11:34 -0600)]
Remove %newkeys from Tie::File::_oadjust
Recent efforts to add strict have shown this variable
wasn't even being used.
Todd Rinaldo [Fri, 31 Jan 2020 05:02:16 +0000 (23:02 -0600)]
Sync Tie-File changelog with CPAN
Marc Green [Tue, 14 Feb 2012 01:04:37 +0000 (20:04 -0500)]
Reword pod2html crossref err msgs; show only if $verbose
Fixes #11860
Karen Etheridge [Mon, 10 Feb 2020 19:52:59 +0000 (11:52 -0800)]
add missing RT links to older perldelta
Karen Etheridge [Mon, 10 Feb 2020 19:48:07 +0000 (11:48 -0800)]
improve pod formatting and minor punctuation nit
Yves Orton [Mon, 10 Feb 2020 09:17:15 +0000 (10:17 +0100)]
t/porting/manifest.t: ignore .mailmap
.mailmap is used by git to map emails in commit logs to their
correct form. When I added it in
a04d7ffe7d4cd836bf5246ea6050612f01403a96
I checked MANIFEST for .gitignore, which I did not find, and assumed
that dotfiles were exempt from MANIFEST requirements. Similarly I
assumed there was nothing to test. Bad Yves.
This updates the test to ignore .mailmap in MANIFEST checks.
Yves Orton [Mon, 10 Feb 2020 08:37:39 +0000 (09:37 +0100)]
.mailmap: add a file to allow git to show correct emails
the .mailmap file allows git to correct committer details in things like
git log. Compare `git log --author=yves` with `git log --use-mailmap --author=yves`
the former finds commits I have made using old email addresses, the latter
finds nothing as the corrected version of my name is "Yves Orton". Conversly
`git log --use-mailmap --author=Yves` will find pretty much *all* of my commits.
Yves Orton [Thu, 6 Feb 2020 07:40:57 +0000 (08:40 +0100)]
toke.c - handle ${10} properly - Issue #12948
${10} and $10 were handled differently, this patch makes them be handled
the same. It also forbids multi-digit numeric variables from starting
with 0. Thus $00 is now a new fatal exception
"Numeric variables with more than one digit may not start with '0'"
Tony Cook [Thu, 6 Feb 2020 13:08:24 +0000 (08:08 -0500)]
Document purpose of miniperl
For: https://github.com/Perl/perl5/issues/16158
(formerly RT 132137).
Hugo van der Sanden [Sun, 9 Feb 2020 16:46:15 +0000 (16:46 +0000)]
skip op/signame_canonical test under miniperl
It requires Data::Dumper
Yves Orton [Sat, 8 Feb 2020 15:02:49 +0000 (16:02 +0100)]
perl.h: define PERL_BITFIELD8/16/32 as U8/U16/U32
After consultation with xenu we decided that defining both sets exactly the same
as U8/U16/U32 makes the most sense.
These defines were added in
654eccd594bfe8deab367b0f4cdda726a7796ff3 and the discussion
for why is here: https://www.nntp.perl.org/group/perl.perl5.porters/2008/01/msg133754.html
Short summary: Activestate added these defines so that XS code compiled with gcc on windows
could be used with a perl compiled with VC on windows, and vice-versa. Read the thread
for more details.
This patch does NOT remove the duplicate definition in win32/win32.h, I
don't feel comfortable doing that without being able to check the build,
so I will leave it to someone who has VC to test.
Yves Orton [Sat, 8 Feb 2020 14:14:38 +0000 (15:14 +0100)]
pp_sys.c: add casts to silence Win32 build warnings
Yves Orton [Sat, 8 Feb 2020 12:06:07 +0000 (13:06 +0100)]
regcomp.c: silence possible loss of data warnings
added casts, and asserts to verify that we arent losing data
..\regcomp.c(3589) : warning C4244: '=' : conversion from 'U32' to 'U8', possible loss of data
..\regcomp.c(3603) : warning C4244: '=' : conversion from 'U32' to 'U16', possible loss of data
..\regcomp.c(4192) : warning C4244: '=' : conversion from 'unsigned long' to 'U8', possible loss of data
..\regcomp.c(14900) : warning C4244: '=' : conversion from 'UV' to 'char', possible loss of data
..\regcomp.c(14918) : warning C4244: '=' : conversion from 'UV' to 'char', possible loss of data
..\regcomp.c(17621) : warning C4244: 'function' : conversion from 'IV' to 'const char', possible loss of data
..\regcomp.c(17643) : warning C4244: 'function' : conversion from 'IV' to 'const char', possible loss of data
Yves Orton [Sat, 8 Feb 2020 10:58:32 +0000 (11:58 +0100)]
Revert "Update Scalar-List-Utils to CPAN version 1.54"
This reverts commit
16933d619ff0a6284a4a90626ab5d39e472c694f.
This breaks Win32 builds as it does not include trunc(),
which is causing havoc with our build process. See issue #17550
Yves Orton [Sat, 8 Feb 2020 10:02:08 +0000 (11:02 +0100)]
fix defines for PERL_BITFIELDxx on Linux and Win32
for some reason PERL_BITFIELD32 is defined as "unsigned" which is
defined to be the same as "unsigned int" which could be 16 bits.
This changes the definition for PERL_BITFIELDxx to be the same
on both platforms and to use the full names for the type, and to
use a type which is guaranteed to be at least 32 bits long for
PERL_BITFIELD32.
Chris 'BinGOs' Williams [Fri, 7 Feb 2020 11:06:59 +0000 (11:06 +0000)]
Update Scalar-List-Utils to CPAN version 1.54
[DELTA]
1.54 -- 2020-02-02 15:47
[CHANGES]
* Added List::Util::reductions (RT128237)
* Added List::Util::sample (RT131535)
* Recognise $List::Util::RAND as a source of randomness for sampling
functions (RT131536)
[BUGFIXES]
* Document the difference between ref() and reftype() on precompiled
qr// regexps (RT127963)
* Various improvements to List::Util::uniqnum() to handle stringified
Inf and NaN, negative zero
* Detect platform NV size and number of digits required to calculate
uniqueness
Chris 'BinGOs' Williams [Fri, 7 Feb 2020 10:24:04 +0000 (10:24 +0000)]
Tie-File is 1.05 on CPAN
Chris 'BinGOs' Williams [Fri, 7 Feb 2020 10:21:48 +0000 (10:21 +0000)]
Update parent to CPAN version 0.238
[DELTA]
0.238 2020-02-07
. Move the prerequisite Test::More from being a runtime prerequisite
to a test time / build time prerequisite (PR #11, by Haarg)
Chris 'BinGOs' Williams [Fri, 7 Feb 2020 10:19:44 +0000 (10:19 +0000)]
Update Devel-PPPort to CPAN version 3.57
[DELTA]
3.57 - 2020-01-31
* Fix eval_sv for Perl versions prior to 5.6.0 (Pali)
* Fix t/ppphtest.t for Perl versions prior to 5.6.0 (Pali)
* Fix compilation of sv_setsv_flags when GCC extensions are not present (Pali)
* Fix SV_NOSTEAL on 5.7.2 (Karl Williamson)
* Fix multiple unit test issues (Craig A. Berry, Karl Williamson, Pali)
* Avoid generating warnings on early Perls (Karl Williamson)
* Backport memCHRs (Karl Williamson)
* Implement sv_setsv_flags() with SV_NOSTEAL and SV_GMAGIC flags for Perl versions < 5.7.3 (Pali)
* Implement UTF8f format and its UTF8fARG macro (Pali)
Chris 'BinGOs' Williams [Fri, 7 Feb 2020 10:12:36 +0000 (10:12 +0000)]
Update Archive-Tar to CPAN version 2.36
[DELTA]
2.36 02/02/2020
- Add xz test files to MANIFEST
2.34 01/02/2020 (HEANEY && SKAJI)
- Add xz support
- Use 4 digit year in Time::Local call
Yves Orton [Fri, 7 Feb 2020 07:31:49 +0000 (08:31 +0100)]
regcomp.c: make \K+ and \K* illegal.
Karl Williamson [Wed, 5 Feb 2020 20:22:30 +0000 (13:22 -0700)]
perlunicode: Slight clarification
Karl Williamson [Wed, 5 Feb 2020 20:20:56 +0000 (13:20 -0700)]
pod/perlrecharclass.pod: Slight clarification
James E Keenan [Wed, 5 Feb 2020 20:42:35 +0000 (15:42 -0500)]
Additional email for E Choroba
Keep Porting/checkAUTHORS.pl happy.
E. Choroba [Wed, 5 Feb 2020 13:26:27 +0000 (14:26 +0100)]
Add a missing switch to a documentation example
The switch is mentioned in the next paragraph.
It was removed in
428bacd701ef45155f9dfd0d9c3d063dc305de00, probably
by accident (the commit message isn't much informative).
Dagfinn Ilmari Mannsåker [Tue, 4 Feb 2020 15:51:11 +0000 (15:51 +0000)]
regen/opcdode.pl: remove alternate PP function implementation support
This was only used for working around a bug in glibc < 2.3, which was
removed in the previous commit.
Dagfinn Ilmari Mannsåker [Tue, 4 Feb 2020 15:46:13 +0000 (15:46 +0000)]
pp_i_modulo(): remove workaround for ancient glibc bug
Old glibc versions had a buggy modulo implementation for 64 bit
integers on 32-bit architectures. This was fixed in glibc 2.3,
released in 2002 (the version check in the code is overly cautious).
Removing the alternate PP function support is left for the next
commit, in case we need to resurrect it in future.
Todd Rinaldo [Fri, 31 Jan 2020 07:11:37 +0000 (01:11 -0600)]
Make it possible to remove a closed IO::Socket handle from IO::Select.
Fixes #17447
Todd Rinaldo [Thu, 30 Jan 2020 17:53:31 +0000 (11:53 -0600)]
Pass the canonical signal name to the signal handler when it is invoked.
Prior to this change, when a signal handler was invoked, the signame passed
into the sub would be the name of the signal that was defined first via {}.
This meant that the handler had to either be aware of the duplicates and
handle things appropriately or it would be at the mercy of action at a
distance the handler might be unaware of.
This change assures a consistent signal name for now on. It should be
the first signal listed in $Config{sig_name}. Duplicates are listed
at the end.
Dagfinn Ilmari Mannsåker [Tue, 4 Feb 2020 15:24:54 +0000 (15:24 +0000)]
pp_(get|set)priority: remove ancient glibc C++ workaround
Glibc has enum typedefs for some arguments that are defined as `int`
by the X/Open standard. This is fine in C, but until glibc
2.3 (released in 2002) this was also done for C++, which is not
allowed.
James E Keenan [Fri, 31 Jan 2020 03:23:18 +0000 (03:23 +0000)]
Do not ignore non-zero error code from 'make minitest'
In pipelines like:
$ sh ./Configure -des -Dusedevel && \
make minitest && make test_harness
... we don't want to run 'make test_harness' unless 'make minitest' has
succeeded.
To test:
$ echo "exit(1);" >> t/base/cond.t
$ make minitest && echo "hello world"
# [note that minitest fails quickly and 'echo' is not reached]
$ git checkout -- t/base/cond.t
$ make minitest && echo "hello world"
# [note that minitest runs and 'echo' is reached]
For: https://github.com/perl/perl5/issues/16160
Originally: https://rt-archive.perl.org/perl5/Ticket/Display.html?id=132139
James E Keenan [Mon, 3 Feb 2020 21:33:19 +0000 (16:33 -0500)]
Prohibit usage of Test::Simple under 't/'
One of the objectives of t/porting/bootstrap.t has been to prohibit use of
testing modules which need to be loaded via 'use MODULE' in test files found
in subdirectories under 't/'. In those subdirectories, we do not presume that
module loading via 'use MODULE' has been demonstrated to work. However, the
unit test in bootstrap.t was written solely to spot instances of 'use
Test::More'. It did not consider the possibility that a test file under 't/'
might 'use Test::Simple'.
There was one such test file which use-d Test::Simple:
t/lib/overload_nomethod.t. This patch rewrites that file to use 't/test.pl'
(as other t/lib/*.t files customarily do) and adapts t/porting/bootstrap.t to
rule out 'use Test::Simple' as well as 'use Test::More' from '*.t' files
underneath 't/'.
For: https://github.com/Perl/perl5/issues/13231
James E Keenan [Mon, 3 Feb 2020 20:44:50 +0000 (15:44 -0500)]
Clarify guidance for usage of Test::More in tests
As reported by Smylers in RT 119619 (now GH 13231), the guidance
provided in 'perlhack' for usage of Test::More is misleading. In
practice, we do not use Test::More in test files in the
subdirectories underneath 't/'. In these directories we test
Perl 5's "pre-modular" functionality -- functionality which does not
depend on our having demonstrated that we can load code via 'use
MODULE'. Usage of 'use MODULE' in 't/*/*.t' files has been largely
prohibited by a unit test in t/porting/bootstrap.t.
This patch clarifies that guidance.
POD correction per Tony Cook
For: https://github.com/Perl/perl5/issues/13231
David Mitchell [Tue, 4 Feb 2020 12:23:26 +0000 (12:23 +0000)]
multiconcat: keep assign for 'local $foo = "..."'
In something like
local $~ = "$~X";
i.e. where localising a magic variable whose previous value should be
used as part of a string concat on the RHS, don't fold the assign into
the multiconcat op. Otherwise the code execution path looks a bit like:
local($~) = undef;
multiconcat($~, $~, "X");
[ where multiconcat's args are (target, arg1, arg2,....) ]
and thus multiconcat sees an undef arg.
By leaving the assign out of the multiconcat, code execution now looks
like
my $targ;
multiconcat($targ, $~, "X");
local($~) = $targ;
See http://nntp.perl.org/group/perl.perl5.porters/256898,
"Bug in format introduced in 5.27.6".
Although the bug only appears with magic vars, this patch pessimises
all forms of 'local $foo = "..."', 'local $foo{bar} = "..."' etc.
Strictly speaking the bug occurs because with 'local' you end up with
two SVs (the saved one and the one currently in the glob) which both
have the same container magic and where mg_set()ing one changes the
mg_get() value of the other. Thus, vars like $!. One of the two SVs
becomes an arg of multiconcat, the other becomes its target. Part of
localising the target SV (before multiconcat is called) wipes the value
of the arg SV.
Yves Orton [Sun, 2 Feb 2020 13:15:18 +0000 (14:15 +0100)]
pp_sort.c: Tinker with pp_sort to untickle mingw bug
David Mitchell [Mon, 3 Feb 2020 14:44:55 +0000 (14:44 +0000)]
pp_crypt(): reindent CPP directives
They were all over the place.
Whitespace-only.
Yves Orton [Tue, 4 Feb 2020 08:02:47 +0000 (09:02 +0100)]
B::perlstring - add support for \e (Fix #17526)
In
daf6caf1ef25ff48f871fa1e53adcefc11bf1d08 karl made pv_uni_display()
use the available mnemonic escapes instead of using \x{} style escapes.
This broke B::perlstring() which has an exclusion list of such escapes
to passthrough, and it did not know about \e, so it produced "\\e"
instead of "\e", which of course does not round trip.
This in turn broke Sub::Quote, which in turn breaks Moo, which breaks
a lot of stuff. :-)
Unfortunately B::perlstring() had no tests to detect this, so we only
found out when we got a BBC report that happened to also ticklet this
bug.
This patch adds 'e' to the exclusion list, and also adds tests to see
that the the first 1024 unicode codepoints and all 255 non-unicode
codepoints can round trip through B::perlstring().
This should resolve #17526 and indirectly help us close #17245.
With this patch we bump B.pm to v1.80
Karl Williamson [Mon, 3 Feb 2020 23:20:03 +0000 (16:20 -0700)]
Support Unicode properties Identifier_(Status|Type)
These non-UCD properties are now being asked to be supported by the
Unicode regular expression specification, UTS #18
These have a slightly different header syntax for giving the version
than UCD files. In this commit, I modify these to fit, but will
probably have to generalize at some point the parsing of versions in
mktables.
Karl Williamson [Mon, 3 Feb 2020 23:19:26 +0000 (16:19 -0700)]
Add Unicode UTS #39 files
The Unicode regular expression specification, UTS #18 is being revised
to require properties that aren't part of the strict Unicode character
database. This commit adds the first two that are being asked for.
Karl Williamson [Mon, 3 Feb 2020 21:49:44 +0000 (14:49 -0700)]
mktables: Generalize the scx property handling
Until now, this property was unique in that it specifies a set of
possible values for scripts that a character can be in, rather than a
single script. That multiplicity has been handled specially. But the
next couple of commits will introduce another property that has similar
characteristics. This commit makes the scx handling more general, so as
to also be usable for the new property.
Karl Williamson [Mon, 3 Feb 2020 21:01:56 +0000 (14:01 -0700)]
mktables: Improve warning msg
Karl Williamson [Mon, 3 Feb 2020 20:44:44 +0000 (13:44 -0700)]
mktables: Add capability to override match directory
This is because this is still supposed to work on DOS 8.3 filesystems,
and future commits will use non-Unicode-Character-Database tables which
don't have shorter names.
David Mitchell [Mon, 3 Feb 2020 12:37:15 +0000 (12:37 +0000)]
pp_crypt(): remove ancient glibc bug workaround
GH #16552
In 2003 a fix was added to workaround a bug in glibc's crypt_r()
implementation (which involved tweaking a private undocumented field
within the crypt_data struct). This bug has long since been fixed, but
the workaround remained. This commit finally removes that workaround.
See also v5.27.11-33-ge9c9cf5759.
David Mitchell [Mon, 3 Feb 2020 12:15:54 +0000 (12:15 +0000)]
Tie::File: use unique tmp filename in 29a_upcopy.t
This is a followup to v5.31.7-92-g0a1552bada which made each Tie::File
test script use a separate prefix for its test file names. However,
there are two test files with prefixes 29_ and 29a_, and that commit
made them both use "29" for the temp file. Make it "29a" instead.
Yves Orton [Fri, 31 Jan 2020 14:02:46 +0000 (15:02 +0100)]
toke.c: fix Multidimensional array heuristic to ignore function calls
Fix issue #16535 - $t[index $x, $y] should not throw Multidimensional
array warnings.
The heuristic for detecting lists in array subscripts is implemented
in toke.c, which means it is not particularly reliable. There are
lots of ways that code might return a list in an array subscript.
So for instance $t[do{ $x, $y }] should throw a warning but doesn't.
On the other hand, we can make this warning less likely to happen
by being a touch more careful about how we parse the inside of the
square brackets so we do not throw an exception from $t[index $x,$y].
Really this should be moved to the parser so we do not need to rely
on fallable heuristics, and also into the runtime so that if we have
$t[f()]
and f() returns a list we can also warn there. But for now this
improves things somewhat.
Hugo van der Sanden [Sat, 1 Feb 2020 12:20:42 +0000 (12:20 +0000)]
op.c: hoist first-pass logic out of loop in pmtrans()
Mainly to avoid gcc warnings that found the logic too complex to follow.
Hugo van der Sanden [Sat, 1 Feb 2020 12:11:07 +0000 (12:11 +0000)]
op.c: balance braces in #if 0 section
Balance the braces so we can bounce to matching braces for the rest
of S_pmtrans.
Yves Orton [Fri, 31 Jan 2020 14:34:48 +0000 (15:34 +0100)]
pp_sort.c: fix fencepost error in call to av_extend()
In [rt.cpan.org #39196] issue #17496 there is a report
that Tie::File produced spurious blank lines in the file
after
@tied= sort @tied;
it turns out that this is because Tie::File treats
EXTEND similarly to STORESIZE (which is arguably not
entirely correct, but also not that weird) coupled
with an off by one error in the calls to av_extend()
in pp_sort.
This patch fixes the fencepost error, adds some comments
to av_extend() to make it clear what it is doing, and
adds a test that EXTEND is called by this code with
correct argument.
Yves Orton [Thu, 30 Jan 2020 08:36:37 +0000 (09:36 +0100)]
perltie.pod: rework example code so EXTEND is a no-op
Most tied array implementations can and should NO-OP the EXTEND
method, and the sample code should not conflate EXTEND with STORESIZE.
EXTEND is actually less usefully used by the core than it could be
as AvMAX() does not have an equivalent tied method. So we cannot
check if we need to extend for a tied array.
This is related to [rt.cpan.org #39196] / Issue #17496.
Unicode Consortium [Tue, 28 Jan 2020 17:36:44 +0000 (10:36 -0700)]
Use Unicode 13.0 (beta)
Unicode has changed its yearly release cycle so that the final version
is not available until early March of the year. This year it is March
10, 2020.
However, all changes planned were finalized in early January, and the
actual computer files have been updated to their presumably final
substantive versions. The release has been authorized without further
review needed.
The release is awaiting final documentation additions, and soak time of
the beta to verify there are no glitches. This commit causes Perl to
participate in that soak.
I don't anticipate any problems, and likely the only substantive change
upon the official release will be to update perldelta. Comments in the
files supplied by Unicode will likely also change to indicate these are
no longer beta.
There were very few changes affecting existing characters; most of the
changes involved adding new characters, including emoji. The break
characteristics of some existing characters were changed (GCB, LB, WB,
and SB properties). The only perl code I really had to change to cope
with the new release was about rules in the Line Break property, dealing
around ellipses (...) and certain East Asian characters next to opening
parentheses.
If there are problems, we can revert this at any time, and ship with
12.0.
Karl Williamson [Thu, 30 Jan 2020 20:20:53 +0000 (13:20 -0700)]
Change Unicode property abbrev to upcoming official
Unicode 12.0 used a new property file that was not from the Unicode
Character Database. It only had a long property name. I incorporated
it into our data, and rather than use the very long name all the time, I
created my own short name, since there was no official one.
Now, the upcoming 13.0 has moved the file to the UCD, and come up with a
short name that differs from the one I had. This commit converts to use
Unicode's name. This property is not exposed to user or XS space, so
there is no user impact.
Karl Williamson [Thu, 30 Jan 2020 20:02:19 +0000 (13:02 -0700)]
regen/mk_invlists.pl: Sort generated tables alphabetically
This change causes certain tables to be sorted so their row and column
headings appear alphabetically, which makes them easier to read.
Karl Williamson [Thu, 30 Jan 2020 19:52:30 +0000 (12:52 -0700)]
regen/mk_invlists.pl: Clarify comment in output .h
Karl Williamson [Thu, 30 Jan 2020 19:39:12 +0000 (12:39 -0700)]
regen/mk_invlists.pl: Do sort caselessly in places
This makes things more like dictionary order
Karl Williamson [Thu, 30 Jan 2020 18:11:58 +0000 (11:11 -0700)]
regen/mk_invlists.pl; White space, comments only
James E Keenan [Wed, 29 Jan 2020 18:49:23 +0000 (13:49 -0500)]
perldelta for commit
92e3396ae2
Paul Johnson [Wed, 29 Jan 2020 17:02:02 +0000 (18:02 +0100)]
Fix minor grammar nit in threads docs
Committer: Increment $VERSION.
James E Keenan [Mon, 27 Jan 2020 20:22:54 +0000 (15:22 -0500)]
Local variable 'o' hides a parameter of the same name
LGTM static code analysis identified declaration of 'o' in a scope where
a variable of the same name had already been declared in an enclosing
scope.
Simply renaming the variable within the inner scope did not work
(extensive segfaults). Tony Cook identified problem: In inner scope we
were using macro cLISTOPo, which implicitly modifies 'o'. Since
cLISTOPo is nothing more than macro cLISTOPx() with 'o' provided as the
argument, we can resolve the problem by using cLISTOPx() with a better
named variable -- in this case, 'child'.
Reference: https://lgtm.com/projects/g/Perl/perl5/snapshot/
9b2028e54156e4dbcc7a57bbd72e1b00a2e0ce39/files/op.c?sort=name&dir=ASC&mode=heatmap#x9b0ebeab3d026530:1
James E Keenan [Mon, 27 Jan 2020 20:02:46 +0000 (15:02 -0500)]
Harmonize whitespace.
James E Keenan [Wed, 29 Jan 2020 03:05:49 +0000 (22:05 -0500)]
Correct misleading entries in SYNOPSIS
Correct documentation as per suggestion from T.E. Hofmann. Add a new test file demonstrating correctness of the synopsis.
For: GH 17499
Originally reported 2004-03-30 by T.E. Hofmann in Tie-File RT queue:
https://rt.cpan.org/Ticket/Display.html?id=5837
Tony Cook [Tue, 28 Jan 2020 23:31:20 +0000 (10:31 +1100)]
Tony Cook [Tue, 21 Jan 2020 04:29:13 +0000 (15:29 +1100)]
bump $IO::VERSION
Tony Cook [Tue, 21 Jan 2020 04:17:30 +0000 (15:17 +1100)]
NetBSD, Darwin, Cygwin don't appear to support SO_PROTOCOL
at least on AF_UNIX sockets.
We supply zero for protocol when creating AF_UNIX sockets, and
we no longer cache that incorrect value. On systems such as NetBSD
that don't implement SO_PROTOCOL this means we can't fetch
the protocol and the protocol() method will hence return undef.
The same applies to Darwin and Cygwin.
Andrew Hewus Fresh [Mon, 23 Sep 2019 00:36:47 +0000 (17:36 -0700)]
Only cache io_socket_proto if protocol is truthy
According to socket(2):
A value of 0 for protocol will let the system select an appropriate
protocol for the requested socket type.
While linux, and possibly others, return 0 for this, OpenBSD recently
got support for SO_PROTOCOL in getsockopt(2) and instead of returning
0, indicating it will choose the correct protocol, it instead returns
the protocol that was chosen. That means caching "0" as the chosen
protocol means that what $sock->protocol returns is not the same as what
getsockopt($sock, SOL_SOCKET, SO_PROTOCOL) returns.
While there is ongoing discussion about whether returning 0 vs something
else is correct, the current situation shows that this value is
implementation specific and we should not cache something that might not
be right.
James E Keenan [Tue, 28 Jan 2020 20:33:15 +0000 (15:33 -0500)]
More descriptive variable name
Per discussion with Tony Cook, rename one variable used in commit
5162664ad5f (p.r. 17368) on Dec 16 2019.
Dan Book [Mon, 13 Jan 2020 21:22:49 +0000 (16:22 -0500)]
Update links to perlrun to link to specific items
Tony Cook [Tue, 28 Jan 2020 00:19:41 +0000 (11:19 +1100)]
add support for E<sol> and E<verbar> to diagnostics.pm
perlpod says:
* "E<lt>" -- a literal < (less than)
* "E<gt>" -- a literal > (greater than)
* "E<verbar>" -- a literal | (*ver*tical *bar*)
* "E<sol>" -- a literal / (*sol*idus)
The above four are optional except in other formatting codes,
notably "L<...>", and when preceded by a capital letter.
so those two were the only ones missing from diagnostics.pm's
escape translation tables.
Tony Cook [Mon, 27 Jan 2020 23:33:27 +0000 (10:33 +1100)]
Tony Cook [Mon, 20 Jan 2020 03:47:38 +0000 (14:47 +1100)]
only install ExtUtils::XSSymSet man page on VMS
This module is only installed on VMS, so there's not much point in
installing the man page.
An alternative would be to install the module on VMS, but it tries
to use configuration only set on VMS.
fixes #17424
Tony Cook [Thu, 16 Jan 2020 03:32:51 +0000 (14:32 +1100)]
run/switches.t: allocate the in-place edit test directory with tempfile
Previously it used a static tmpinplace/ directory, which could
cause the "trash left behind" test to fail if a previous run
was aborted for some reason.
fixes #17423
Todd Rinaldo [Mon, 27 Jan 2020 07:18:23 +0000 (01:18 -0600)]
Bump version on Tie::File to 1.05
Todd Rinaldo [Mon, 27 Jan 2020 06:55:01 +0000 (00:55 -0600)]
Remove silly version change test for Tie::File
The only thing that t/00_version.t seems to do is require you to change
it when VERSION is updated.
Also corrected spaces not tabs in MANIFEST.
Todd Rinaldo [Mon, 27 Jan 2020 06:15:16 +0000 (00:15 -0600)]
Correct typo in MAINFEST for new file in Tie::File
Todd Rinaldo [Mon, 27 Jan 2020 06:09:20 +0000 (00:09 -0600)]
Add Changelog to Tie::File to make CPAN updates easier.
Hugo van der Sanden [Mon, 27 Jan 2020 03:40:50 +0000 (03:40 +0000)]
Hugo van der Sanden [Sun, 26 Jan 2020 18:28:43 +0000 (18:28 +0000)]
regexec: don't increment recursion counter for non-postponed EVAL
It wasn't intended to be part of the recursion logic, and doesn't get
decremented again (GH 17490).
Tony Cook [Mon, 27 Jan 2020 03:21:56 +0000 (14:21 +1100)]
Tony Cook [Mon, 27 Jan 2020 00:31:56 +0000 (11:31 +1100)]
bump $Storable::VERSION and update ChangeLog
Tony Cook [Wed, 22 Jan 2020 00:18:21 +0000 (11:18 +1100)]
Storable/t/recurse.t: note may not be available
If this wasn't a trivial change, I'd just drop support for 5.6.2,
but 5.6.2 has a Test::More without note() and modern Test::More
depends on Storable, so ensure we work without note().
partial fix for #17422
Tony Cook [Wed, 22 Jan 2020 00:16:14 +0000 (11:16 +1100)]
Storable/Makefile.PL: fix dependencies
partial fix for #17422
Tony Cook [Sun, 26 Jan 2020 23:47:57 +0000 (10:47 +1100)]
perldelta for
4b004c43ef2
Tony Cook [Tue, 21 Jan 2020 05:12:44 +0000 (16:12 +1100)]
always treat undef in %INC as a failed require
Previously require would check for the specific \&PL_sv_undef
SV in %INC, this meant that if %INC was copied, or undef
assigned to a member the entry would erroneously be treated as if
a previous require of that file was successful.
So check for SvOK() instead, with appropriate magic tests.
fixes #17428
Tony Cook [Tue, 21 Jan 2020 04:57:32 +0000 (15:57 +1100)]
test case for GH #17428, an interaction between undef in %INC and require
Leon Timmermans [Fri, 24 Jan 2020 23:51:44 +0000 (00:51 +0100)]
perlio.c: make :unix close method call underlaying layers as well
Karen Etheridge [Sat, 25 Jan 2020 19:13:27 +0000 (11:13 -0800)]
Update perlfaq to CPAN version 5.
20200125
[DELTA]
5.
20200125 2020-01-25 19:11:04Z
* remove references to smartmatch in perlfaq4; replace use of
List::Util::first with any (PR#85, Dan Book)
* add links to plackperl.org (#66)
Yves Orton [Sat, 25 Jan 2020 02:55:39 +0000 (03:55 +0100)]
regcomp.c: restore {} braces to DEBUG_PARSE_r multi-statements
In
15cab4d7052 the if (!SIZE_ONLY) logic was removed from regcomp.c,
but in a few places this was excessively zealous, as the braces were
removed from multiline constructs inside of DEBUG_PARSE_r macros.
EG:
DEBUG_PARSE_r(if (!SIZE_ONLY) {
stuff1;
stuff2;
stuff3;
});
was turned into
DEBUG_PARSE_r(
stuff1;
stuff2;
stuff3;
);
Which means that ONLY the first statement in the block was covered
by the DEBUG_PARSE_r() conditional logic. The conversion should have
been:
DEBUG_PARSE_r({
stuff1;
stuff2;
stuff3;
});
IOW, it was necessary to preserve the {} braces in the macro call.
This silences various forms of debugging that should not be visible
in a plain
use re 'debug';
and should only be visible with something like
use re Debug => 'ALL';
Eg in:
$ ./perl -Ilib -Mre=debug -le'/(foo|bar|baz)/'
Compiling REx "(foo|bar|baz)"
~ tying lastbr BRANCH (9) to ender CLOSE1 (12) offset 3
~ tying lastbr OPEN1 (1) to ender END (14) offset 13
Final program:
1: OPEN1 (3)
3: TRIE-EXACT[bf] (12)
<foo>
<bar>
<baz>
12: CLOSE1 (14)
14: END (0)
stclass AHOCORASICK-EXACT[bf] minlen 3
Freeing REx: "(foo|bar|baz)"
The "~ tying lastbr" lines are of interest pretty much only to
someone working on or maintaining the regex engine and should not
be visible to a casual user, not only because they are ugly but
also because the context to understand them is missing and they
do not help understanding how the regex operates.
Yves Orton [Tue, 5 Nov 2019 23:12:49 +0000 (00:12 +0100)]
XS-APItest: add tests for U8TO64_LE() and other hashing macros and code
Includes testing siphash24 and siphash13 properly, especially
testing against the SipHash 2-4 reference test vector,
see https://131002.net/siphash/siphash24.c
See also #17244 where we originally discovered there were no
tests for the internals of the hashing code and that because
of it we let slip in a very broken patch to the code.
Thanks to James E Keenan, Tony Cook and Hugo Van der Sanden
for support putting this together.
XS-APItest: fixup issues with # directives
for some reason the indentation of the #if clauses broke things
under some builds, but not all. Possibly a ccache issue.
Yves Orton [Fri, 24 Jan 2020 15:08:35 +0000 (16:08 +0100)]
hv_func.h: tweak how we deal with 64 bit Siphash
This slightly modifies how we apply Siphash in our code
so that instead of taking the low 32 bits of the hash
we return the xor of the high and low 32 bits.
This also adds /* FALLTHROUGH */ statements to some of
the related code so that picky compilers don't get upset
as it is not a mistake.
Lastly this allows our test code to access both the
"real" 64 bit Siphash, and also the reduced 32 bit version.
Most of this is in preparation for adding tests for
some of our hash related code. See next commit.
Tomasz Konojacki [Thu, 23 Jan 2020 01:06:17 +0000 (02:06 +0100)]
win32: don't set the base address of perl5xx.dll
It was causing LNK4281 warning on modern Visual C++ versions. Also,
-base is a security risk because it opt-outs from ASLR.
That switch was added as an optimization 20 years ago, but I don't
think the potential benefits are worth the trouble.
Karl Williamson [Wed, 22 Jan 2020 23:06:32 +0000 (16:06 -0700)]
grok_bin_oct_hex: Add some branch predictions
This led to about a 7% improvement, number of branches went 2.3kk->1.9kk
in perf, thanks to Sergey Aleynikov. cachegrind shows:
Key:
Ir Instruction read
Dr Data read
Dw Data write
COND conditional branches
IND indirect branches
_m branch predict miss
The numbers represent raw counts per loop iteration.
eight_hex_digits
87654321
blead latest Ratio %
----- ------ -------
Ir 306.0 297.0 103.0
Dr 76.0 76.0 100.0
Dw 41.0 39.0 105.1
COND 26.0 26.0 100.0
IND 2.0 2.0 100.0
COND_m 0.1 0.0 Inf
IND_m 3.0 3.0 100.0