This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Karl Williamson [Sat, 19 Nov 2016 12:57:46 +0000 (05:57 -0700)]
Devel-PPPort: Rmv impediment to compiling under C++11
C++11 changed from earlier versions to require space between the end of
a string literal and a macro, so that a feature can unambiguously be
added to the language. Starting in g++ 6.2, the compiler emits a
deprecation warning when there isn't a space (presumably so that future
versions can support C++11).
Although not required by the C++11 change, this patch also makes sure
there is space after a macro call, before a string literal.
Code and modules included with the Perl core need to be compilable using
C++. This is so that perl can be embedded in C++ programs. (Actually,
only the hdr files need to be so compilable, but it would be hard to
test that just the hdrs are compilable.) So we need to accommodate
changes to the C++ language.
Father Chrysostomos [Fri, 12 Jan 2018 16:37:18 +0000 (08:37 -0800)]
Fix goto-into-string-eval under PERL_UNICODE
More precisely, goto-to-jump-into-the-parameter-of-a-string-eval,
which is tested in goto.t as of
6d90e98384, but fails as of that
commit under PERL_UNICODE, because entereval gets a second kid
op (a hintseval op) and ‘looks like’ a list operator, which
6d90e98384 generally forbad.
The easiest way to fix this is simply to add another exception.
Craig A. Berry [Thu, 11 Jan 2018 20:42:43 +0000 (14:42 -0600)]
VMS does have gai_strerror.
And we need to say we have it for the latest version of Socket
to build successfully.
Dagfinn Ilmari Mannsåker [Tue, 9 Jan 2018 17:32:51 +0000 (17:32 +0000)]
Update Socket to CPAN version 2.025
2.025 2018-01-09 15:12:51
[CHANGES]
* Add IPPROTO_ICMPV6
[BUGFIXES]
* Fix for C++11 compilers - require a space either side of
string-pasting macros (thanks Karl Williamson)
* Fix for machines lacking HAS_SOCKADDR_IN6 (RT116913) (thanks ilmari)
* Print to STDERR on test failures (RT123436) (thanks ilmari)
2.024 2016/08/11 13:49:48
[BUGFIXES]
* Restore back-compat to pre-2.011 behaviour on undefined port
numbers to pack_sockaddr_in(6?) - silently accept undef as zero
(RT116699)
* Warn if pack_sockaddr_un is truncating an overly long path
(mitigates but does not resolve RT116819)
2.023 2016/08/02 14:50:50
[CHANGES]
* Add more socket(7), ip(7) and ipv6(7) socket options from Linux
[BUGFIXES]
* Fix skip count for abstract AF_UNIX path tests when not running on
Linux
2.022 2016/08/01 16:02:48
[CHANGES]
* Throw exceptions if pack/unpack sockaddr functions are passed
undefined arguments (RT116624)
[BUGFIXES]
* Fix coverty complaint (RT111707)
2.021 2015/11/18 17:09:13
[CHANGES]
* Add constants for TCP fastopen (RT105155)
[BUGFIXES]
* Respect HAS_GETHOSTBYNAME before calling gethostbyname() (RT105947)
* Fixes for inet_pton() fallback on Win32 (RT107058)
* Fix for INET_ADDRSTRLEN on AmigaOS (really!) (RT106797)
* Provide gai_strerror() fallback on platforms that lack one
(RT76091)
Zefram [Wed, 10 Jan 2018 21:09:45 +0000 (21:09 +0000)]
fix Data-Dumper postentry for quoted glob
In Data-Dumper, where a glob with a quoted name required a postentry,
the name part of the postentry was being emitted as just "}". This was
an old bug affecting upgraded glob names, which the recent commit
abda9fe0fe75ae824723761c1c98af958f17a41c made affect all quoted glob
names. Fix the postentry name to encompass the entire quoted name.
Fixes [perl #132695].
Tomasz Konojacki [Wed, 10 Jan 2018 03:49:08 +0000 (04:49 +0100)]
loc_tools.pl: properly load fallback locales
It turns out that some tests using loc_tools.pl are being executed
from a different working directory than './t', which causes
do("./lib/locale/<locale>") to fail.
This fixes lib/warnings.t on Windows.
Discussion:
https://www.nntp.perl.org/group/perl.perl5.porters/2018/01/msg248652.html
Father Chrysostomos [Mon, 8 Jan 2018 16:29:26 +0000 (08:29 -0800)]
Use ck_null for ~.
It no longer needs ck_bitop, which it only used before for the
experimental warning that has been removed.
Karl Williamson [Wed, 10 Jan 2018 02:49:32 +0000 (19:49 -0700)]
Devel;:PPPort: Skip tests invalid on EBCDIC
I don't think it's worth the effort to port these couple of tests.
Karl Williamson [Tue, 9 Jan 2018 21:20:35 +0000 (14:20 -0700)]
t/loc_tools.pl: Remove debug line
This was inadvertently left in in the previous commit
Karl Williamson [Tue, 9 Jan 2018 20:19:12 +0000 (13:19 -0700)]
t/loc_tools.pl: Display diagnostic on non-found file
The diagnostic output added in
759b442cd504fd04e125d71b981f7092ec3fbea1
shows that in some platforms that the path to certain files is not
correct at the time (spotted by Tomasz Konojacki).
This commit tests for the existence of the files, and if not found warns
and doesn't process further. This warning gives a better clue in the
future as to the cause of the problem. The other warning remains, in
case there are other causes, now or in the future.
We are still working on the best way to specify these files, as the
hard-coded relative path that specifies them gets disrupted if the
current directory gets changed.
Karl Williamson [Tue, 9 Jan 2018 16:48:59 +0000 (09:48 -0700)]
t/op/exec.t: Add missing /i
This was failing on z/OS due to its capitalization of an expected word.
The similar tests in this file use /i; this is the only one missing it.
I'm presuming we don't want to do a qr// in testing this basic
functionality, othewise it would be better to use the same re everywhere
to avoid this kind of typo.
Chris 'BinGOs' Williams [Tue, 9 Jan 2018 12:43:33 +0000 (12:43 +0000)]
Update Encode to CPAN version 2.94
[DELTA]
$Revision: 2.94 $ $Date: 2018/01/09 05:53:00 $
! lib/Encode/Alias.pm
Fixed: deep recursion in Encode::find_encoding when decoding
bad MIME header
https://github.com/dankogai/p5-encode/pull/127
! Encode.pm
Pulled: Include more information about Encode::is_utf8() that it
should not be normally used
https://github.com/dankogai/p5-encode/pull/126
Pulled: Remove misleading documentation about UTF8 flag
https://github.com/dankogai/p5-encode/pull/125
Chris 'BinGOs' Williams [Tue, 9 Jan 2018 12:41:38 +0000 (12:41 +0000)]
Update Time-HiRes to CPAN version 1.9752
[DELTA]
1.9752 [2018-01-04]
- fix an error in the error message of utimensat() not available:
it said futimens() not available
- add --force alias for Makefile.PL --configure
1.9751 [2018-01-02]
- in macOS/OSX/Darwin, use __has_builtin() check also for utimensat(),
can cause errors like
"HiRes.xs:1474:16: error: unrecognized platform name macOS"
[rt.cpan.org #123994]
(oversight from 1.9749)
- do not define TIME_HIRES_STAT/d_hires_stat if none was found, instead
of defining it to be zero, which case has no implementation in hrstatns()
(thanks to Nigel Horne)
- in t/utime.t try to divine if the filesystem of the tempfiles has been
mounted with the 'noatime' option, which can prohibit updating the
access time timestamp. Also document this in HiRes.pm.
(thanks to Nigel Horne, original analysis by Slaven Rezic)
- synchronize the constant lists in HiRes.pm:@EXPORT_OK
and Makefile.PL:doConstants and regenerate fallback/const-c.inc
and fallback/const-xs.inc, this fixes Perl 5.6.2 issue with
d_futimens not allegedly being a valid macro in t/utime.t
(using Perl 5.26.1 for the regenerating, not 5.6.2)
(thanks to Nigel Horne)
- in t/utime.t define a nop sub done_testing for ancient Perls
(like Perl 5.6.2)
- in Perl 5.6.2 a bogus warning
"Use of uninitialized value in subroutine entry"
is issued from t/alarm.t: add a comment documenting that
Father Chrysostomos [Mon, 8 Jan 2018 16:18:21 +0000 (08:18 -0800)]
perldelta for #130936
Father Chrysostomos [Mon, 8 Jan 2018 06:23:03 +0000 (22:23 -0800)]
[perl #130936] Forbid some cases of inward goto
This commit in general forbids entry into the parameter of a binary or
list operator, to avoid crashes and stack corruption.
In cases like
goto f;
push @array, do { f: }
and
goto f;
$a + do { f: };
it’s not possible to fix this in general. Cases like
goto f;
do { f: } + $a;
(jumping into the first parameter) have never caused problems, but I
went ahead and forbad that usage too, since it would be too compli-
cated to figure out exactly which parameter is being jumped into.
(It’s not impossible; it would just double the amount of code used to
find labels.)
List operators taking just a simple list, such as die(), have never
worked properly, because goto() bypasses the pushmark. They could be
made to work, but that would require extra work to distinguish cases
like push and print that have a first operand (sometimes implicit for
print) of a specific type. I figured it was easier just to forbid
jumping into any list operator. It’s also much easier to document.
Father Chrysostomos [Mon, 8 Jan 2018 05:13:01 +0000 (21:13 -0800)]
state.t: Allow to run under miniperl
Useful for debugging.
Father Chrysostomos [Mon, 8 Jan 2018 04:46:54 +0000 (20:46 -0800)]
Stop alloc_LOGOP from always setting OPf_KIDS
Commit v5.21.1-125-g3253bf8, which added the function, caused entertry
to get a kid op. Before:
$ perl5.20.1 -MO=Concise -eeval{}
5 <@> leave[1 ref] vKP/REFC ->(end)
1 <0> enter ->2
2 <;> nextstate(main 2 -e:1) v:{ ->3
4 <@> leavetry vK ->5
3 <|> entertry(other->4) v ->6
6 <0> stub v ->4
-e syntax OK
Notice entertry has no K. After:
$ perl5.22.0 -MO=Concise -eeval{}
5 <@> leave[1 ref] vKP/REFC ->(end)
1 <0> enter ->2
2 <;> nextstate(main 1 -e:1) v:{ ->3
4 <@> leavetry vK ->5
3 <|> entertry(other->4) vK ->6
6 <0> stub v ->4
-e syntax OK
This time it has a K, but it has no kid ops.
This causes problems for a patch I am working on, because one
can no longer depend on cUNOPo->op_first being non-null when
o->op_flags & OPf_KIDS.
alloc_LOGOP should only set the KIDS flag if it actually has kids.
Peter John Acklam [Sun, 7 Jan 2018 13:28:58 +0000 (08:28 -0500)]
Facilitate building with quadmath on Cygwin.
For: RT # 128627
Craig A. Berry [Fri, 5 Jan 2018 19:54:35 +0000 (13:54 -0600)]
Alternate backup file rename test for VMS.
The existing test that made a directory called foo.bak and then
made sure the rename of a backup file from in-place edit failed
to overwrite the directory doesn't work on VMS because there is
no conflict between a file named foo.bak and directory named
[foo^.bak] in directory syntax or foo^.bak.DIR in filename syntax.
The .DIR extension is always there, and other dots in the name
are escaped with caret because dot is the directory delimiter.
So just make version 32767 of foo.bak and when the rename tries
to make the next higher version it will fail. We're testing what
happens when the rename fails not why it fails, so we accomplish
the same goal via a different mechanism.
Craig A. Berry [Fri, 5 Jan 2018 18:10:25 +0000 (12:10 -0600)]
Document system(1, @args) under VMS in perlport.
It's been there for Win32 for some time, but we've imitated the
Windows behavior since
eed5d6a149b02c1699.
Craig A. Berry [Thu, 4 Jan 2018 23:32:46 +0000 (17:32 -0600)]
Hide Perl_isSCRIPT_RUN from the re extension.
Otherwise the extension fails to build on VMS because the symbol
is multiply defined and a linker warning about that is escalated
to a run-time error.
Karl Williamson [Thu, 4 Jan 2018 19:50:35 +0000 (12:50 -0700)]
Actually remove stray ';'
The previous commit was supposed to include this
Karl Williamson [Thu, 4 Jan 2018 19:24:43 +0000 (12:24 -0700)]
regexec.c: Clarify comments; remove stray ';'
Karl Williamson [Thu, 4 Jan 2018 19:22:26 +0000 (12:22 -0700)]
Script Run: Scripts couldn't start with Common
The Common script is supposed to be intermixable with any other script.
But it wasn't properly handling the case where the first character in
the string was Common, and a subsequent character was some real script.
Karl Williamson [Thu, 4 Jan 2018 19:13:23 +0000 (12:13 -0700)]
Script runs: was swallowing next char in pattern
In /(+script_run:foo)bar/, the 'b' was being swallowed without being
acted upon. This would affect the '$' to mean match end of string
Karl Williamson [Mon, 1 Jan 2018 20:39:42 +0000 (13:39 -0700)]
Make script run code a separate function
This just does the minimal work (plus white space) to make this code
into a separate function, so that it can be called from elsewhere in the
core.
Niko Tyni [Sat, 16 Sep 2017 08:24:18 +0000 (11:24 +0300)]
Add missing newline to the "Unable to flush stdout" diagnostic
Originally reported by Jakub Wilk.
Bug-Debian: https://bugs.debian.org/875361
David Mitchell [Tue, 2 Jan 2018 13:55:29 +0000 (13:55 +0000)]
pp_multiconcat(): fix win32 compiler warning
pp_hot.c(930) : warning C4146: unary minus operator applied to unsigned type,
result still unsigned
Negating an unsigned STRLEN (aka Size_t) string length in this case will
never encounter a situation where the value is too big to be negated,
because at that point we have both the string and a grown buffer of at
least equal size in memory simultaneously, so targ_len < Size_t_MAX/2.
So just cast away the warning.
Craig A. Berry [Mon, 1 Jan 2018 21:48:36 +0000 (15:48 -0600)]
Quote one-liner in exec.t on VMS.
On VMS, system() sends a complete command to the CLI rather than
passing arguments via exec. So arguments need to be quoted if
they have anything the shell doesn't like or contain spaces.
Craig A. Berry [Mon, 1 Jan 2018 16:10:33 +0000 (10:10 -0600)]
Reenable numeric first argument of system() on VMS.
This was broken in
64def2aeaeb63f92dadc6dfa334, and fixed for Win32
only in
8fe3452cc6ac7af8c08. But VMS also uses a numeric first
argument to system() as a flag indicating spawn without waiting for
completion.
Karl Williamson [Mon, 1 Jan 2018 19:33:38 +0000 (12:33 -0700)]
t/loc_tools.pl: Add diagnostic output
We are getting non-fatal output from this on z/OS. This will help pin
down the problem, and remain in place in case other such situations
arise.
Karl Williamson [Mon, 1 Jan 2018 19:32:22 +0000 (12:32 -0700)]
t/loc_tools.pl: Implement fail() if not available
Previously, this file require the caller to have implemented ok() (which
they may not have done. Now, it uses fail() instead if available, and
itsd own hand-rolled version otherwise.
Karl Williamson [Sun, 31 Dec 2017 19:25:25 +0000 (12:25 -0700)]
t/loc_tools.pl: Tidy up
Instead of using $@, use the variable set to $@ just after the eval.
This is cleaner, and avoids an issue should new code be inserted between
them that affects $@
Karl Williamson [Sun, 31 Dec 2017 19:03:01 +0000 (12:03 -0700)]
regexec.c: Change declaration to U8
from char in the new script_run code. This makes it more convenient to
run gdb on.
Karl Williamson [Sun, 31 Dec 2017 16:49:46 +0000 (09:49 -0700)]
locale.c: Add checks for improper locale
There has been code to check that the new locale is compatible with
ASCII when switching to one; this commit expands those checks. A locale
that isn't ASCII-compatible doesn't play well with Perl.
Karl Williamson [Sun, 31 Dec 2017 16:23:37 +0000 (09:23 -0700)]
regen/mk_invlists.pl: Add table for currency symbols
This will be used in a future commit
Karl Williamson [Sun, 31 Dec 2017 14:53:32 +0000 (07:53 -0700)]
locale.c: Improve debugging output
This extracts some debugging output code into a function (so that it can
be called from more than one place) and add some detail to the output.
Karl Williamson [Sun, 31 Dec 2017 14:40:26 +0000 (07:40 -0700)]
Remove constness of parameter that no longer is
This was masked by the fact that this is a macro that calls the real
function
Father Chrysostomos [Mon, 1 Jan 2018 01:03:36 +0000 (17:03 -0800)]
[Merge] Make bitwise feature no longer experimental
Father Chrysostomos [Mon, 1 Jan 2018 01:02:13 +0000 (17:02 -0800)]
perldelta for bitwise ops
Father Chrysostomos [Sun, 31 Dec 2017 20:54:44 +0000 (12:54 -0800)]
Update docs wrt bitwise ops
Father Chrysostomos [Sun, 31 Dec 2017 20:24:01 +0000 (12:24 -0800)]
Enable bitwise feature with ‘use v5.28’
Father Chrysostomos [Sun, 31 Dec 2017 19:24:57 +0000 (11:24 -0800)]
Remove experimental bitwise warning
Craig A. Berry [Sun, 31 Dec 2017 14:10:23 +0000 (08:10 -0600)]
XSLoader shouldn't use mod2fname when finding .bs files.
This is a belated follow-up to
907196b2ca1c36611c32cb8, where I
did the same for DynaLoader but failed to notice that XSLoader has
its own check for the .bs file before it invokes DynaLoader.
This finally gets the new bootstrap.t test added to XS::APItest
in
2e6f1ae9c4f7857e86f85fde07 passing on VMS.
Karl Williamson [Sun, 31 Dec 2017 06:24:35 +0000 (23:24 -0700)]
perldelta for /[[:ascii:]]/ changes
Karl Williamson [Wed, 27 Dec 2017 01:13:36 +0000 (18:13 -0700)]
regexec.c: Replace loop by memchr()
This loop can be potentially very long as it is used to find the next
place there is a potential match in something like /(foo)+abc/. (It's
trying to find the 'a' in that example.
Zefram [Sat, 30 Dec 2017 12:36:54 +0000 (12:36 +0000)]
assert nested CV existence when freeing CV
[perl #131631] has a convoluted test case that messes up parser error
recovery and causes a segv via null pointer dereference. Turn the segv
into an assertion failure, by asserting non-nullness of the pointer.
This doesn't fix the actual problem with error recovery.
Zefram [Sat, 30 Dec 2017 11:48:00 +0000 (11:48 +0000)]
clarify doc of "-m" et al
Expand perlrun's documentation of module-loading options. Rather than
describe the options only in terms of C<use> declarations, also describe
their effects in terms of module loading operations. Fixes [perl #131518].
Karl Williamson [Fri, 29 Dec 2017 22:03:47 +0000 (15:03 -0700)]
Optimize /[...]/ into ASCII regnode if appropriate
Previously the optimization of this into a Posix regnode was skipped, as
the regnode for bracketed character classes had about the same
performance as the Posix regnodes did. But the previous commit has
greatly improved the performance of this functionality by using new
ASCII regnodes, so now the optimization makes sense.
Karl Williamson [Fri, 29 Dec 2017 20:35:00 +0000 (13:35 -0700)]
Use new regnodes for /[[:ascii:]]/
Prior to this commit, the ASCII Posix class was treated as any other
Posix class under /a. It turns out that by making separate nodes for it
(and its complement), the performance gains can be astronomical on ASCII
platforms. This is mainly due to the fact that scanning can be done
word-at-a-time, but also because various conditionals can be skipped.
Below are some measurements from Porting/bench.pl on a 64-bit Linux g++
-O2 system.The numbers are for very long strings, as otherwise, the
delta due solely to this change is masked by the overhead around pattern
matching in general. These numbers are for finding an ASCII character
at the end of a very long string of non-ASCII ones.
All 1-byte (non-utf8) characters improvement ratio
Ir 1990.8
Dr 2995.4
Dw 17296.7
COND 786.0
All 2-byte characters improvement ratio
Ir 242.2
Dr 232.9
Dw 17237.8
COND 100.0
The numbers for three and more bytes per character are essentially the
same as for two bytes.
As an example, the Dw for strings consisting entirely of 2-byte
characters (before the terminal ASCII one) now take 584 instructions,
and previously 100,582
The gain would be less for a 32-bit system.
bench.pl returns other measurements which I omitted above, because they
either have unchanged performance or involve a trivial number of total
instructions.
Karl Williamson [Tue, 26 Dec 2017 17:57:49 +0000 (10:57 -0700)]
regcomp.sym: Add regnodes for [[:ascii:]]
These will be used in a future commit
Karl Williamson [Fri, 29 Dec 2017 05:38:39 +0000 (22:38 -0700)]
Speed up /[[:posix:]]/a UTF-8 matching
Before this commit, when a Posix class (not the negation) was matched
against a UTF-8 string, it ignored the UTF-8ness, because it's irrelevant
to the success or failure of the match. However, I now realize it is
relevant to the speed of the match, hence this commit.
In particular, when scanning a string for the next occurrence of, say,
an ASCII word character, it tested every continuation byte. Each one is
relatively efficient, because it is an array lookup, but it's work that
would be avoided if we skipped continuation bytes.
However, to skip continuation bytes, we have to look up how many to
skip. This is extra work that the previous version avoided. So, if the
string is entirely ASCII (but with the UTF-8 bit set), this will be a
loser, as you still have to examine every byte anyway. The more
continuation bytes get skipped, the more of a win this will be. Below
are some measurements from Porting/bench.pl on a 64-bit Linux g++ -O2
system. The numbers are for very long strings, as otherwise, the delta
due solely to this change is masked by the overhead around pattern
matching in general.
All 1-byte characters improvement ratio
Ir 100.0
Dr 80.0
Dw 100.0
COND 100.0
All 2-byte characters improvement ratio
Ir 200.0
Dr 114.3
Dw 200.0
COND 200.0
All 3-byte characters improvement ratio
Ir 300.0
Dr 171.4
Dw 300.0
COND 300.0
All 4-byte characters improvement ratio
Ir 400.0
Dr 228.6
Dw 400.0
COND 400.0
This means that if a string consists entirely of ASCII (1-byte chars),
this patch worsens the number of data read instructions by 20%, while
the other measurements are unchanged. But if the target string consists
entirely of multi-byte characters, the performance in all other criteria
goes up by much larger amounts.
The most important measurement here is COND. One can extrapolate that
if the string contains even just a few multi-byte characters, the COND
improves over what the previous behavior did, and hence this patch is
worth doing.
It's unclear what the average number of bytes in a string might be. If
one is processing text with a large number of bytes per character, why
would one be using /a? But if everything is just ASCII, why is the
UTF-8 bit set? So my best guess is that the strings that this patch
will affect are mostly, but not entirely ASCII, and the number of
conditional branches goes down in this case.
bench.pl returns other measurements which I omitted above, because they
either have unchanged performance or involve a trivial number of total
instructions.
Karl Williamson [Fri, 29 Dec 2017 21:54:17 +0000 (14:54 -0700)]
regcomp.c: Fix an optimization criterium
/[...]/ patterns get optimized into Posix ones if they match the same
things, as the latter are somewhat speedier. The code that checks if
they match was off-by-one, so that it didn't check for a match for \v.
Karl Williamson [Fri, 29 Dec 2017 21:52:34 +0000 (14:52 -0700)]
regcomp.c: Fix comment
This comment misspoke, and was unclear.
Karl Williamson [Wed, 27 Dec 2017 00:53:13 +0000 (17:53 -0700)]
regexec.c: White-space, braces only
This indents code that the previous commit added a block around, and
aligns some conditionals vertically, and adds some braces for clarity,
and removes a couple of extra bank lines.
Karl Williamson [Wed, 27 Dec 2017 00:32:10 +0000 (17:32 -0700)]
regexec.c: Save a conditional per iteration
This commit changes two places where to use a mask instead of a
condition in loops implementing things like /a+/, which can potentially
iterate many times.
This arises under /i matching where we accept either an 'A' or an 'a'
for example. In most cases, the case folds differ in only a single bit,
so we can mask that bit out during comparisons, yielding two possible
characters, precisely the ones we are interested in. This means we
don't have to test for the character being 'A', then test for it being
'a'. We can accomplish this in one conditional.
Karl Williamson [Wed, 27 Dec 2017 01:00:57 +0000 (18:00 -0700)]
perlre: Note a way to continue long regexes across lines
This documents a usage to include \n chars within (?#\n) to easily
break long patterns into smaller chunks that fit on a line. I was not
familiar with this technique until I saw it used, in some of our core
code, so am documenting it for others.
Craig A. Berry [Fri, 29 Dec 2017 22:30:23 +0000 (16:30 -0600)]
Skip failing exit(0) tests on VMS.
It turns out VMS does not have the [perl #2754] bug. When a call
to Perl_my_exit(0) is made from one of the blocks processed during
perl_parse, STATUS_ALL_SUCCESS sets PL_statusvalue_vms to 1. This
is the value that becomes the return value of perl_parse via
STATUS_EXIT. That return value, when non-zero, means perl_run is
skipped. Which seems to be the desired behavior, i.e., exit(0)
from BEGIN, CHECK, and UNITCHECK does actually exit.
The fix on Unix has been rolled back in
857320cbf85e762add18885ae8
temporarily because Module::Install was depending on the bug. It
doesn't seem worth trying to write a compatible bug for VMS, so
just skip the tests that are enforcing the buggy behavior.
Zefram [Fri, 29 Dec 2017 13:51:29 +0000 (13:51 +0000)]
perldelta for smartmatch reversion
Zefram [Fri, 29 Dec 2017 12:39:31 +0000 (12:39 +0000)]
revert smartmatch to 5.27.6 behaviour
The pumpking has determined that the CPAN breakage caused by changing
smartmatch [perl #132594] is too great for the smartmatch changes to
stay in for 5.28.
This reverts most of the merge in commit
da4e040f42421764ef069371d77c008e6b801f45. All core behaviour and
documentation is reverted. The removal of use of smartmatch from a couple
of tests (that aren't testing smartmatch) remains. Customisation of
a couple of CPAN modules to make them portable across smartmatch types
remains. A small bugfix in scope.c also remains.
Zefram [Fri, 29 Dec 2017 12:19:49 +0000 (12:19 +0000)]
make experimental.pm test agnostic about switch
Anticipating imminent reversion of smartmatch behaviour, make
experimental.pm able to test against either version of the switch feature,
detecting empirically which version the running perl supports.
Zefram [Fri, 29 Dec 2017 12:16:52 +0000 (12:16 +0000)]
make autodie more agnostic about smartmatch
Instead of saying that smartmatch lhs overloading no longer works, say
that it is likely to not work in the future. This makes it accurate for
the upcoming reversion of smartmatch behaviour, while remaining usefully
open to this kind of smartmatch change in the future.
Karen Etheridge [Fri, 29 Dec 2017 03:29:15 +0000 (19:29 -0800)]
minor grammar and punctuation fixes
Dagfinn Ilmari Mannsåker [Thu, 28 Dec 2017 18:12:56 +0000 (18:12 +0000)]
Remove unused AUTOGEN_FILES Makefile variable
Commit
36bb303b6ac55df9c2780b48d374c505374dc378 moved the chmod +w that
the variable was used for into regen.pl, but failed to remove the
variable. The regenerated files are already listed in the comment
above (including which script generates them), so the variable doesn't
even have any informational value, it's just a maintenance burden.
Dagfinn Ilmari Mannsåker [Thu, 28 Dec 2017 17:24:43 +0000 (17:24 +0000)]
Simplify Unicode::UCD::openunicode() and callers
Get rid of the file-global filehandles and the unused filename return
value, instead return the filehandle and assign it to a lexical
variable. Also don't bother checking the return value; it croaks on
failure anyway.
In passing, eliminate erroneous assignment of {} to %CASESPEC for
Unicode < 2.1.8.
Dagfinn Ilmari Mannsåker [Thu, 28 Dec 2017 15:14:48 +0000 (15:14 +0000)]
Fix typo in POD for new Unicode::UCD::num() variant
Karl Williamson [Thu, 28 Dec 2017 04:39:50 +0000 (21:39 -0700)]
Fix Pod::Html for EBCDIC
Commit
38e30ca7507a601c2d84596bc51d88c0f3c516b4 introduced a
non-portable regular expression pattern which breaks the module on
EBCDIC.
Any range whose endpoints aren't both digits, both uppercase or both
lowercase will not work on EBCDIC. /[^ -~]/ can more legibly and
portably be written as /[[:^print:]]/a, which is what this commit does.
Karl Williamson [Thu, 28 Dec 2017 04:32:33 +0000 (21:32 -0700)]
t/op/exec.t: Use diag for errors, so not swallowed
This test was just doing a printf to STDOUT.
Karl Williamson [Thu, 28 Dec 2017 01:55:13 +0000 (18:55 -0700)]
Fix t/comp/parser_run.t for EBCDIC
Commit
36000cd1c47863d8412b285701db7232dd450239 added a test which isn't
portable to EBCDIC, using \xD5. The is "N" on EBCDIC platforms, whereas
a non-alphabetic character was intended.
Change to use \xB6 which means paragraph sign on both character sets.
Karl Williamson [Thu, 28 Dec 2017 01:34:35 +0000 (18:34 -0700)]
lib/utf8.pm: Further clarification of UTF-8 flavor
Commit
50a85cfe6c852deb0c2f738cb82006623052dc8e clarified that this
module uses Perl's extended UTF-8, but missed the mention fixed in this
commit.
Scott Lanning [Thu, 23 Nov 2017 18:33:13 +0000 (19:33 +0100)]
POD fix for perlop
Commit
33be4c6111bea619c1662 added a line in pod/perlop.pod
for a new Non-capture mode modifier to qr//.
The 2nd paragraph below that line said:
The last four modifiers listed above, added in Perl 5.14,
control the character set rules, but C</a> is the only one
you are likely to want to specify explicitly; the other three
are selected automatically by various pragmas.
Since the "n" line was added, that paragraph no longer makes sense. I
changed it to refer to the modifiers explicitly instead of the last four
lines. (An alternative would be to move the "n" line above the other
four.)
Karl Williamson [Wed, 27 Dec 2017 20:50:43 +0000 (13:50 -0700)]
Unicode::UCD: Add optional paramter to num()
As discussed in http://nntp.perl.org/group/perl.perl5.porters/244444,
this sets the optional scalar ref paramater to the length of the valid
initial portion of the first parameter passed to num(). This is useful
in teasing apart why the input is invalid.
Zefram [Wed, 27 Dec 2017 21:13:59 +0000 (21:13 +0000)]
postpone perl_parse() exit(0) bugfix
Commit
0301e899536a22752f40481d8a1d141b7a7dda82 fixed a long-standing
bug regarding exit(0) during perl_parse(). This turned out to cause
enough trouble to Module::Install, which accidentally relies on the
bug, that the pumpking wants more time to roll out the fix to affected
CPAN distros. So make perl_parse() once again return 0 for an exit(0).
Reintroduces [perl #2754]; addresses [perl #132577].
Karl Williamson [Tue, 26 Dec 2017 19:59:52 +0000 (12:59 -0700)]
Remove unused interpreter variable
This somehow became unused or never got used; I didn't do the research.
Chris 'BinGOs' Williams [Tue, 26 Dec 2017 13:50:56 +0000 (13:50 +0000)]
Update META.json after JSON-PP update
Chris 'BinGOs' Williams [Tue, 26 Dec 2017 13:49:11 +0000 (13:49 +0000)]
Update JSON-PP to CPAN version 2.97001
[DELTA]
2.97001 to be released
- tweak internal number detector to always considers a flagged
value as a string (GH#35, haarg++)
- clarify json_pp options (RT-123766; Dan Jacobson)
Chris 'BinGOs' Williams [Tue, 26 Dec 2017 13:48:01 +0000 (13:48 +0000)]
Update podlators to CPAN version 4.10
[DELTA]
podlators 4.10 (2017-12-25)
[Pod::Man] Change man page references and function names to bold
instead of italic, following the current Linux man page standard. The
previous formatting was taken from Solaris, and it seems safe to say
that the Linux man page formatting conventions are now much more
widely followed than Solaris's. Patch from Guillem Jover.
[Pod::Man] Revert the .IX handling code to the earlier version from
Bjarni Ingi Gislason but add the trailing backslashes that should
hopefully avoid blank page issues on HP-UX. This fixes a warning
regression when man is run with warnings enabled. (Debian Bug#847972)
[Pod::Man] Wrap the output file descriptor in a glob before passing it
to PerlIO::get_layers so that the layer check works properly.
Previously, this code would throw a warning if given a scalar not
wrapped in a glob and not detect layers properly. Patch from Zefram.
(#122521)
Produce a proper diagnostic when given empty input on standard input
with no other arguments to pod2man or pod2text. Reported by Guillem
Jover.
Chris 'BinGOs' Williams [Tue, 26 Dec 2017 13:44:59 +0000 (13:44 +0000)]
Update Time-HiRes to CPAN version 1.9750
[DELTA]
1.9750 [2017-12-22]
- update META.yml and META.json for XSLoader instead of DynaLoader
[rt.cpan.org #123933]
1.9749 [2017-12-21]
- CPAN release
- Quieten Time-HiRes test noise: blead
0f009486
- Switch some core modules to XSLoader: blead
b9a5a78f [rt.cpan.org #129789]
- disable a flapping test for CI: blead
cd2a978d
- Avoid newGVgen in blead-upstream modules: blead
732d3893
- Declaration after statement in typemap: blead
d269f586
- semicolon-friendly diagnostic control: blead
7347ee54
- in macOS (OS X) check properly in runtime whether futimens()
and utimensat() are available
1.9748 [2017-12-16]
- bleadperl only
- semicolon-friendly diagnostic control: blead
7347ee54
1.9747 [2017-09-13]
- bleadperl only
- Switch some core modules to XSLoader: blead
b9a5a78f [rt.cpan.org #129789]
Zefram [Tue, 26 Dec 2017 07:46:35 +0000 (07:46 +0000)]
avoid infinite recursion in _perl_abs_path()
If _perl_abs_path() couldn't opendir("..") then it would call
File::Spec->rel2abs, which was liable to call back to Cwd::getcwd() and
thus to _perl_abs_path(), producing an infinite recursion. The call to
File::Spec->rel2abs is of dubious value anyway, so just turn that into
an error return. Fixes [perl #132651].
Chris 'BinGOs' Williams [Mon, 25 Dec 2017 19:33:02 +0000 (19:33 +0000)]
Update Digest-SHA to CPAN version 6.01
[DELTA]
6.01 Mon Dec 25 00:08:08 MST 2017
- added "--ignore-missing" and "--strict" options to shasum
-- consistent with GNU coreutils
-- ref. rt.cpan.org #123897
- removed PERL_CORE preambles from test scripts
-- preambles no longer needed for core testing
-- thanks to Chris Williams for patch
-- ref. rt.cpan.org #123863
Karl Williamson [Mon, 25 Dec 2017 00:12:56 +0000 (17:12 -0700)]
regcomp.c: White-space only
Karl Williamson [Mon, 25 Dec 2017 00:11:29 +0000 (17:11 -0700)]
regcomp.h: Add comment
David Mitchell [Mon, 25 Dec 2017 10:40:58 +0000 (10:40 +0000)]
mutlitconcat: fix non-folding adjacent consts
RT ##132646
v5.27.6-120-gbcc30fd changed multiconcat so that adjacent constants
weren't folded, so that ($overloaded . "a" . "b") is invoked as
$overloaded->concat("a")->concat("b")
rather than
$overloaded->concat("ab")
It did this by 'demoting' every second adjacent const as a real arg rather
than adding it to the const string. However, that could leave a
multiconcat op with more than the maximum allowed args.
So include demotion candidates as part of the arg count.
Zefram [Mon, 25 Dec 2017 06:07:26 +0000 (06:07 +0000)]
disable cwd_enoent test
This test, running getcwd() when cwd is an unlinked directory, was
observed to cause an infinite memory-eating loop on FreeBSD. As a
temporary measure it must be disabled. [perl #132651]
Karl Williamson [Mon, 25 Dec 2017 00:28:55 +0000 (17:28 -0700)]
Add script_run to perlexperiment
Karl Williamson [Mon, 25 Dec 2017 00:21:34 +0000 (17:21 -0700)]
Merge branch 'Add script_run feature' into blead
Karl Williamson [Sun, 24 Dec 2017 06:15:37 +0000 (23:15 -0700)]
Add script_run regex feature
As explained in the docs, this helps detect spoofing attacks.
Karl Williamson [Mon, 18 Dec 2017 22:13:48 +0000 (15:13 -0700)]
regcomp.sym: Add nodes for script runs
To be used in the implementation thereof.
Karl Williamson [Mon, 18 Dec 2017 22:12:17 +0000 (15:12 -0700)]
Add warning for script runs being experimental
This will be used in later commits.
Karl Williamson [Sat, 23 Dec 2017 22:15:00 +0000 (15:15 -0700)]
regen/mk_invlists.pl: Generate tables for scx property
Karl Williamson [Sat, 23 Dec 2017 22:08:45 +0000 (15:08 -0700)]
mktables: Generate _Perl_SCX property
Karl Williamson [Sat, 23 Dec 2017 21:45:02 +0000 (14:45 -0700)]
Unicode::UCD.pm Add undocumented internal feature
This allows charprop() to be called on a Perl-internal-only property
Karl Williamson [Sat, 23 Dec 2017 21:37:37 +0000 (14:37 -0700)]
mktables: Canonicalize '-' into '_'
Some early Unicode releases used a hyphen instead of an underscore in
script names. This changes all into underscores
Karl Williamson [Sat, 23 Dec 2017 20:34:47 +0000 (13:34 -0700)]
regen/mk_invlists.pl: Don't generate unneeded #define
This was only defined in regexec.c, but is currently unused
Karl Williamson [Sat, 23 Dec 2017 22:25:57 +0000 (15:25 -0700)]
regen/mk_invlists.pl: Add support of 'sl' formats
This commit adds support of creating an inversion map for properties
that are represented by 'sl' formats, that is strings, but some elements
are references to arrays of strings, each subelement thereof is a
possible match.
Karl Williamson [Sat, 23 Dec 2017 19:39:16 +0000 (12:39 -0700)]
regen/mk_invlists.pl: Simplify handling of early Unicode releases
Several Unicode properties are used internally in regex matching, for
example \b{wb} and \X. The code is supposed to compile and work as best
it can on all Unicode releases. But the rules for these have been
expanded by Unicode over the years, including new types of boundary
conditions. Each such type is given an enum value in an enum type for
the given boundary. For early Unicodes, this enum isn't present.
This commit simplifies how this generating code copes with this,
removing the hard-coded lists in favor of using a different mechanism
already in place for handling slightly different circumstances.
Karl Williamson [Sat, 23 Dec 2017 20:05:58 +0000 (13:05 -0700)]
regen/mk_invlists.pl: Add defensive check
The code assumes a list has been set up with a particular ending point
that isn't obvious. Check for that, and die if incorrect.
Karl Williamson [Sat, 23 Dec 2017 17:24:16 +0000 (10:24 -0700)]
regen/mk_invlists.pl: Fix name clash handler
This code increments a string (like 'a' goes to 'b') when it detects a
possible name clash. But it turns out that the perl magic ++ operator
doesn't get invoked on strings that contain an underscore. Fix by
splitting on the '_', and incrementing the final portion.
Zefram [Sun, 24 Dec 2017 11:09:54 +0000 (11:09 +0000)]
correct error returns from _perl_abs_path()
The perl implementation of abs_path(), and hence of getcwd(), was
returning an empty string on error, and sending a diagnostic to stderr.
The diagnostic for failing to find a directory in its parent included a
bogus $! value. This differed from the XS version, which returns undef
with $! set appropriately. The documentation, not explicit on the topic,
suggests that errors should be signalled more like what the XS was doing.
Resolve the discrepancy by changing the perl implementation to signal
errors by returning undef with $! set appropriately. Document getcwd()
and abs_path() as doing this.
Fixes [perl #132648].
Zefram [Sat, 23 Dec 2017 16:02:51 +0000 (16:02 +0000)]
describe encoding status of DATA handle