This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Tony Cook [Thu, 5 Jan 2017 00:04:05 +0000 (11:04 +1100)]
Tony Cook [Wed, 4 Jan 2017 23:39:44 +0000 (10:39 +1100)]
Various fixes for dtrace builds on FreeBSD and for other platforms
(to a lesser extent)
Tony Cook [Mon, 28 Nov 2016 04:15:18 +0000 (15:15 +1100)]
(perl #130108) check if dtrace accepts -xnolibs and use it if available
dtrace without -xnolibs fails in a FreeBSD jail, so we need to supply
it on FreeBSD.
Unfortunately systemtap's dtrace emulation doesn't support -xnolibs so
we need to test if it's available.
Tony Cook [Mon, 28 Nov 2016 04:19:12 +0000 (15:19 +1100)]
(perl #130108) separate compiled objects from dtrace modified objects
When generating an object file with "dtrace -G", dtrace also modifies
the input object files.
This causes two problems:
1) Since the objects are modified, their modification times are updated
which may break dependency checks by make.
2) on FreeBSD at least, once the object has been processed it can't be
processed again by dtrace -G
Tony Cook [Mon, 28 Nov 2016 04:22:16 +0000 (15:22 +1100)]
(perl #130108) add elf to libswanted on FreeBSD 10.x
usedtrace builds add references to libelf symbols, causing link
failures without it.
at hints time we don't know if the user will interactively select
dtrace and there's no CBU, so it's added unconditionally on 10.x
Tony Cook [Thu, 17 Nov 2016 11:18:30 +0000 (22:18 +1100)]
(perl #130108) generate a dummy dtrace_main.o if perlmain.o doesn't contain probes
efc4bddfd4 added generating a probes object file for perlmain.o, since
the compiler was generating probes even for unused inline functions.
The default compiler on FreeBSD 11 however doesn't generate probes for
these unused inline functions, and dtrace -G fails because it can't
find any.
So if dtrace fails for perlmain.o generate a dummy object file to
take its place.
Similarly for XS::APItest.
Aaron Crane [Wed, 4 Jan 2017 20:02:45 +0000 (20:02 +0000)]
RT#130496: assertion failure for '{}->$x' on undefined $x
Karl Williamson [Mon, 2 Jan 2017 22:58:23 +0000 (15:58 -0700)]
APItest/t/handy.t: Skip locale tests when not in locale
In XS code, the macros that pay attention to locale don't check if they
are being called from within the scope of 'use locale'; they assume that
the code calling them wouldn't be doing so unless appropriate. That's
not true of Perl-level code. I forgot that when writing these tests.
Normally it doesn't show up as a problem as the underlying locale is the
C locale, which on almost all platforms has the effect of not being in a
locale. But the VMS C locale is special, and so doesn't meet the
assumptions of these tests. The solution is to skip locale-aware macros
unless we are testing locale.
Andy Lester [Sat, 24 Dec 2016 05:53:19 +0000 (23:53 -0600)]
Remove unnecessary pointer math.
James E Keenan [Wed, 4 Jan 2017 18:17:19 +0000 (18:17 +0000)]
RT#113960: perl5db should ignore /dev/tty on non-Unix systems
If a Win32 system happens to have a \dev\tty file at the root of the current
drive, we were incorrectly treating that as an indicator that the system is
in fact Unix-like.
Fix this by looking at the filesystem for that file only after considering
all the OS platforms that we know aren't Unix-like in that way.
Aaron Crane [Wed, 4 Jan 2017 15:42:32 +0000 (15:42 +0000)]
RT#130487: fix stack-management bug in Data::Dumper
This was introduced when Data::Dumper acquired the ability to call
B::Deparse from its XS implementation.
Hugo van der Sanden [Wed, 4 Jan 2017 14:52:21 +0000 (14:52 +0000)]
[perl #130495] /x comment skipping stops a byte short
If that byte was part of a utf-8 character, this caused inappropriate
"malformed utf8" warnings or assertions.
In principle this should also skip the newline, but failing to do so
is safe.
James E Keenan [Fri, 27 May 2016 00:29:14 +0000 (20:29 -0400)]
Place discussion of postfix under DESCRIPTION.
Make subheadings more consistent. Say what the WARNING is about.
For: RT #128250, based on suggestions by Father Chrysostomos.
Karl Williamson [Wed, 28 Dec 2016 04:25:39 +0000 (21:25 -0700)]
toke.c: Clarify comment
Karl Williamson [Wed, 28 Dec 2016 04:15:43 +0000 (21:15 -0700)]
toke.c: Keep better track for avoiding work in tr///
As explained in the comments, tr/// creates byte map tables for bytes
0-255 if everything is below 256. If something is higher than that,
special handling is required (currently a swash), and so there is no
point in creating the tables here by expanding each range. Prior to
this commit, it realized this on a per-range basis, not expanding ranges
which extend above 255. This commit changes that so if any time it
finds something above 255, it remembers that and skips the expansion of
all future ranges encountered.
This was done without adding any extra tests outside the specific tr///
code.
Karl Williamson [Wed, 28 Dec 2016 04:20:13 +0000 (21:20 -0700)]
toke.c: Fix comment that said the opposite of what was meant
Karl Williamson [Wed, 28 Dec 2016 03:55:13 +0000 (20:55 -0700)]
toke.c: Simplify expression
Unless there's a reason its needed, I prefer not to set a variable
within an 'if', as it increases the reader's cognitive load.
Karl Williamson [Wed, 28 Dec 2016 03:52:20 +0000 (20:52 -0700)]
SV_UTF8_NO_ENCODING is no longer used
It once had meaning under 'use encoding';
Karl Williamson [Fri, 19 Aug 2016 03:41:08 +0000 (21:41 -0600)]
toke.c: White-space only
Indent after previous commit added new blocks, and a couple other white
space adjustments
Karl Williamson [Fri, 19 Aug 2016 00:54:13 +0000 (18:54 -0600)]
toke.c: Potentially avoid work when converting to UTF-8
Some code points < 256 are the same whether represented in UTF-8, or
not. Others change to require 2 bytes to represent in UTF-8. When
parsing a string, using UTF-8 is avoided unless necessary, because of
the extra overhead required for processing UTF-8. This means that when,
during the parse, we discover we need to convert to UTF-8, we have to,
in effect, reparse whatever we have so far to make sure those code
points that differ under UTF-8 get their proper representation. This
reparsing would not be necessary if we know that the string doesn't have
such code points.
It turns out that keeping track of having seen UTF-8 variant code points
is cheap, requiring no extra branch instructions. And the payoff is
potentially large, avoiding having to reparse the string. This commit
changes to keep track.
Karl Williamson [Mon, 26 Dec 2016 04:53:04 +0000 (21:53 -0700)]
toke.c: Reorder if/else branches
It is easier to read code if the trivial branch is follows immediately
after the 'if'.
Karl Williamson [Wed, 28 Dec 2016 02:37:33 +0000 (19:37 -0700)]
toke.c: Fix too-small SvGROW()
This might be a bug on EBCDIC, but not ASCII platforms. The code forgot
that SvGROW takes a total size, and not an incremental size. So, this
is most likely a no-op, but I believe there are no cases on ASCII
platforms where this actually needs to grow, and on EBCDIC, it would
only be very large, way above Unicode, code points. Grows in later
iterations of the loop would recover to grow to the correct size, unless
this EBCDIC escape sequence was the final thing there.
Karl Williamson [Wed, 28 Dec 2016 02:20:08 +0000 (19:20 -0700)]
toke.c: Simplify a couple of expressions
By storing an intermediate result in a temporary, the final expression
is clearer.
Karl Williamson [Wed, 28 Dec 2016 02:45:07 +0000 (19:45 -0700)]
toke.c: Convert sv_grow to SvGROW
The latter is preferred
Karl Williamson [Tue, 3 Jan 2017 01:08:57 +0000 (18:08 -0700)]
APItest/t/handy.t: Fix for EBCDIC
There were several instances where the native code point and the Unicode
equivalent were being conflated.
Aaron Crane [Mon, 2 Jan 2017 15:12:45 +0000 (15:12 +0000)]
perlhacktips: add some notes on TRUE and FALSE
Steve Hay [Mon, 2 Jan 2017 21:20:05 +0000 (21:20 +0000)]
Add epigraphs for 5.22.3-RC5 and 5.24.1-RC5
Aaron Crane [Mon, 2 Jan 2017 18:40:42 +0000 (18:40 +0000)]
makedepend.SH: omit trailing "." in progress messages
Since the message ends in the name of a file, I find that the trailing dot
makes it harder to select the filename in my terminal emulator.
Steve Hay [Mon, 2 Jan 2017 17:23:15 +0000 (17:23 +0000)]
Update copyright year
David Mitchell [Mon, 2 Jan 2017 16:37:27 +0000 (16:37 +0000)]
Handle chop(@a =~ tr///)
RT #130198
'chop(@x =~ tr/1/1/)' crashed with an assertion failure. Ditto for chomp.
There are two quirks which together cause this. First, the op tree for
a tr// is different from other bind ops:
$ perl -MO=Concise -e'$x =~ m/a/'
5 <@> leave[1 ref] vKP/REFC ->(end)
1 <0> enter ->2
2 <;> nextstate(main 1 -e:1) v:{ ->3
4 </> match(/"a"/) vKS ->5
- <1> ex-rv2sv sK/1 ->4
3 <#> gvsv[*x] s ->4
$ perl -MO=Concise -e'$x =~ tr/a/b/'
5 <@> leave[1 ref] vKP/REFC ->(end)
1 <0> enter ->2
2 <;> nextstate(main 1 -e:1) v:{ ->3
- <1> null vKS/2 ->5
- <1> ex-rv2sv sKRM/1 ->4
3 <#> gvsv[*x] s ->4
4 <"> trans sS ->5
Note that the argument for the match is a child of the match, while the
arg of the trans is an (earlier) sibing of the trans (linked by a common
null parent).
The normal code path that croaks when e.g. a match is seen in an lvalue
context,
$ perl -e'chop(@a =~ /a/)'
Can't modify pattern match (m//) in chop at -e line 1, near "/a/)
is skipped, since lvalue() is only called for the first child of a null op.
Fixing this is as simple as calling lvalue() on the RHS too if the RHS is
a trans op.
The second issue is that chop and chomp are special-cased not to flatten
an array; so
@b = 10..99;
chop $a, @b, $c;
pushes 3 items on the stack to pass to pp_chop, rather than 102. pp_chop()
itself then iterates over any array args.
The compiler was seeing the rv2av op in chop(@a =~ tr///) and was setting
the OPf_REF (don't flatten) flag on it. Which then caused pp_trans to
panic when its arg was an AV rather than a string.
This second issue is now moot, since after the fix suggested above, we
will have croaked before we reach the place where OPf_REF would be set.
This commit adds lots of tests, since tr/a/a/ and tr/a/b/r are
special-cased in terms of whether they are regarded as modifying the
var they are bound to.
Steve Hay [Mon, 2 Jan 2017 15:07:59 +0000 (15:07 +0000)]
5.22.3-RC5 and 5.24.1-RC5 today
James E Keenan [Sun, 1 Jan 2017 15:12:56 +0000 (10:12 -0500)]
John Lightsey [Sun, 25 Dec 2016 02:41:40 +0000 (21:41 -0500)]
Fix a null pointer dereference segfault in Storable.
At point where the retrieve_code logic was unable to read the string that
contained the code.
Also fix several locations where retrieve_other was called with a null context
pointer. This also resulted in a null pointer dereference.
Committer: Add tests adapted from submitter's test program.
For: RT #130098
jdhedden [Sat, 31 Dec 2016 17:51:35 +0000 (12:51 -0500)]
Upgrade to threads 2.12
For: RT # 130469
jdhedden [Sat, 31 Dec 2016 17:33:47 +0000 (12:33 -0500)]
Upgrade to threads::shared 1.54
jkeenan [Mon, 13 Aug 2012 01:55:42 +0000 (21:55 -0400)]
Clarify that 'installhtml' is intended only for use in the Perl 5 core distribution.
For: RT # 114466
jdhedden [Fri, 30 Dec 2016 17:37:21 +0000 (12:37 -0500)]
Upgrade to threads::shared 1.53
For: RT #130457
James E Keenan [Fri, 30 Dec 2016 17:30:17 +0000 (12:30 -0500)]
Prevent tests from getting hung up on 'NonStop' option.
For: https://rt.perl.org/Ticket/Display.html?id=130445
Thanks to Håkon Hægland for report and suggestion. Simplify revisions, per
feedback from Aaron Crane.
James E Keenan [Fri, 30 Dec 2016 14:58:17 +0000 (09:58 -0500)]
Discuss Porting/sync-with-cpan -- the simpler usage -- first.
Incorporate feedback from Aaron Crane.
Aaron Crane [Fri, 30 Dec 2016 18:48:36 +0000 (18:48 +0000)]
[MERGE] Further improvements to Porting/sync-with-cpan
With these changes, all the recent module imports could have been handled
automatically; and applying it to a tricky case that hasn't yet been
imported does now at least yield better advice on how to proceed.
Aaron Crane [Fri, 30 Dec 2016 18:27:14 +0000 (18:27 +0000)]
Porting/sync-with-cpan: another preflight check
Aaron Crane [Fri, 30 Dec 2016 18:00:45 +0000 (18:00 +0000)]
Revert "Porting/sync-with-cpan: apply --jobs=N when running module tests"
This reverts commit
06998c55f9d56cbee761af0d6dc5ec06fcee3c62.
It turns out that some CPAN modules' test suites fail when run in parallel.
For example, DB_File has three test files, all of which create database files
of the same names. (I'm slightly puzzled as to why I don't see failures from
that module whenever running Perl's test suite in parallel; my guess is that,
when only a few test files are being run, it's much more likely that the
tests will be run simultaneously.)
We can submit patches for modules with serial-only test suites, but for now
at least, the best course of action seems to be for sync-with-cpan to run
modules' test suites serially.
Aaron Crane [Fri, 30 Dec 2016 16:07:05 +0000 (16:07 +0000)]
Porting/sync-with-cpan: handle unwritable files in tarballs
If the tarball contains an unwritable file, we were throwing an exception
when trying to open the file for appending. Opening the file isn't actually
necessary for bumping the file's timestamp, which was the intention of that
code. However, it's a good idea to make the file locally-writable anyway, so
that if the user later needs to edit it, they can do so easily.
Aaron Crane [Fri, 30 Dec 2016 16:04:35 +0000 (16:04 +0000)]
Porting/sync-with-cpan: remove needless loop
The de_exec() routine is only ever called with one argument at a time, so
simplify it.
Aaron Crane [Fri, 30 Dec 2016 15:40:16 +0000 (15:40 +0000)]
Porting/sync-with-cpan: fix bug in updating Maintainers.pl
We must look for $module, not $cpan_mod, because the former is specifically
the key in %Modules under which we found the details for this dist.
Aaron Crane [Fri, 30 Dec 2016 15:26:37 +0000 (15:26 +0000)]
Porting/sync-with-cpan: try to change "::" to "-" in module name
This is needed for cases like IO-Compress when the user asks for
"IO::Compress".
In addition, if we still can't find the module, be more explicit about what
the problem is.
Aaron Crane [Fri, 30 Dec 2016 15:05:42 +0000 (15:05 +0000)]
Porting/sync-with-cpan: offer advice in the face of CUSTOMIZED
Aaron Crane [Fri, 30 Dec 2016 14:01:57 +0000 (14:01 +0000)]
[MERGE] Improve Porting/sync-with-cpan
The original goal of this sequence of patches was to address RT#130375. That
ticket proposes extending the release manager's guide with discussion of
what regen/lib_cleanup.pl does, and why it might sometimes be needed, and
thus why Porting/sync-with-cpan might yield a porting-test failure when
t/porting/regen.t detects that it needs to be run.
However, I find the RMG is already relatively bulky, and therefore hard to
navigate; so adding more text to it would exacerbate that problem. In
addition, it seems much better to merely fix this problem: we can always run
regen/lib_cleanup.pl, and if it makes any changes, those changes can be
committed along with the updated CPAN module being imported.
This merge also contains a few other improvements to Porting/sync-with-cpan:
- The log file it generates is now listed in .gitignore
- It allows specifying the module name with "-" rather than "::" as a name
separator
- A bug that prevented the new module's tests from being run is now fixed
- The MANIFEST is now rewritten to accommodate any file deletions introduced
by the updated CPAN module
- The messages emitted have been reworked slightly for clarity; in
particular, "Fixing MANIFEST" will no longer be followed by a confusing
and scary "'MANIFEST' is NOT sorted properly" message
- It now takes a --jobs option, which if supplied is used both for executing
make and running the module's tests
- The --tarball option now works when the tarball isn't in the current
directory
- It runs a few additional preflight checks that detect mistakes I found
myself making
These changes have been tested by using Porting/sync-with-cpan to import
Test::Simple into blead as of
54f6f377a29af7d60918c003fc2c462439c340bd,
since that was the triggering case for RT#130375.
Aaron Crane [Fri, 30 Dec 2016 13:51:04 +0000 (13:51 +0000)]
Porting/sync-with-cpan: allow out-of-tree --tarball file
Previously, in this situation, we correctly used Archive::Tar to extract the
contents of the tarball under cpan/, but then tried to look for the files in
a nonexistent directory alongside the original tarball.
Aaron Crane [Fri, 30 Dec 2016 13:46:11 +0000 (13:46 +0000)]
Porting/sync-with-cpan: more preflight checks for --tarball
If the file supplied doesn't exist (or names a directory), we'll get a
failure from Archive::Tar after having already made some changes.
Aaron Crane [Fri, 30 Dec 2016 13:42:51 +0000 (13:42 +0000)]
Porting/sync-with-cpan: avoid unless/else
Aaron Crane [Fri, 30 Dec 2016 11:33:37 +0000 (11:33 +0000)]
Porting/sync-with-cpan: bail out early if Configure hasn't been run
Aaron Crane [Fri, 30 Dec 2016 11:32:39 +0000 (11:32 +0000)]
Porting/sync-with-cpan: factor out internal WIN32 constant
Aaron Crane [Fri, 30 Dec 2016 11:51:38 +0000 (11:51 +0000)]
Porting/sync-with-cpan: apply --jobs=N when running module tests
This requires switching from t/TEST to t/harness.
Aaron Crane [Thu, 29 Dec 2016 19:01:51 +0000 (19:01 +0000)]
Porting/sync-with-cpan: add --jobs option
Aaron Crane [Thu, 29 Dec 2016 18:54:56 +0000 (18:54 +0000)]
Porting/sync-with-cpan: avoid "Attempting to …" message
That message doesn't have a follow-up along the lines of "and it worked", so
the user might be left wondering what happened.
Aaron Crane [Thu, 29 Dec 2016 18:40:54 +0000 (18:40 +0000)]
Porting/sync-with-cpan: improve advice emitted at end
Aaron Crane [Thu, 29 Dec 2016 18:17:45 +0000 (18:17 +0000)]
Porting/sync-with-cpan: run regen/lib_cleanup.pl if possibly needed
Aaron Crane [Thu, 29 Dec 2016 16:51:09 +0000 (16:51 +0000)]
Porting/sync-with-cpan: delete entries from MANIFEST if needed
Aaron Crane [Thu, 29 Dec 2016 16:37:52 +0000 (16:37 +0000)]
Porting/sync-with-cpan: run manisort with --quiet
Without this, the user is likely to see consecutive lines saying "Fixing
MANIFEST" and "'MANIFEST' is NOT sorted properly", which looks pretty scary.
Aaron Crane [Thu, 29 Dec 2016 16:35:10 +0000 (16:35 +0000)]
Porting/sync-with-cpan: run manisort under the current perl
Aaron Crane [Thu, 29 Dec 2016 13:07:35 +0000 (13:07 +0000)]
Porting/sync-with-cpan: do in fact run the new dist's tests
At the point we look for the dist's test files, we've just chdir-ed into
Perl's t/ directory (since we need to be able to run the ./perl binary in
that directory), so the tests are therefore under ../cpan/$dist.
Aaron Crane [Thu, 29 Dec 2016 13:04:36 +0000 (13:04 +0000)]
Porting/sync-with-cpan: accept dist name instead of package name
Since the directories in cpan/ are named for the dist, this is perhaps more
obvious, at least in some situations.
Aaron Crane [Thu, 29 Dec 2016 13:01:28 +0000 (13:01 +0000)]
Porting/sync-with-cpan: mention generation of make.log
And factor that filename out into a variable.
Aaron Crane [Fri, 30 Dec 2016 10:18:05 +0000 (10:18 +0000)]
Porting/sync-with-cpan: don't reimplement tmpdir()
Aaron Crane [Thu, 29 Dec 2016 12:57:17 +0000 (12:57 +0000)]
gitignore build product from Porting/sync-with-cpan
James E Keenan [Fri, 30 Dec 2016 02:25:22 +0000 (21:25 -0500)]
Paul Marquess [Fri, 30 Dec 2016 02:23:32 +0000 (21:23 -0500)]
Upgrade Compress-Raw-Bzip2 to CPAN version 2.070.
James E Keenan [Thu, 29 Dec 2016 21:56:32 +0000 (16:56 -0500)]
Paul Marquess [Thu, 29 Dec 2016 21:53:43 +0000 (16:53 -0500)]
Upgrade Compress-Raw-Zlib to CPAN version 2.070.
Craig A. Berry [Thu, 29 Dec 2016 20:03:43 +0000 (14:03 -0600)]
Don't define Perl_isFOO_lc in the regex extension.
Otherwise it ends up multiply defined, which annoys the VMS linker
(and probably the AIX linker too).
James E Keenan [Thu, 29 Dec 2016 17:46:50 +0000 (12:46 -0500)]
James E Keenan [Thu, 29 Dec 2016 17:39:12 +0000 (12:39 -0500)]
Update DB_File from CPAN version 1.838 to 1.840.
From Changes:
1.840 29 Dec 2016
* #119569: Failed to install DB_File-1.839 into Linux
1.839 29 Dec 2016
* #119557: DB_File.xs: unused-parameter warnings
* #107642: unused arg
Jerry D. Hedden [Wed, 28 Dec 2016 16:37:45 +0000 (11:37 -0500)]
Silence one warnings generated during 'make' by clang.
See: https://rt.cpan.org/Ticket/Display.html?id=119529
Committer: Update version number in module's POD. Add perldelta entry.
Karl Williamson [Thu, 29 Dec 2016 15:19:06 +0000 (08:19 -0700)]
handy.h: Add missing right paren in macro
This only affected EBCDIC builds, causing syntax errors.
Karl Williamson [Thu, 29 Dec 2016 04:49:06 +0000 (21:49 -0700)]
APItest.xs: Silence compiler warnings
See: http://www.nntp.perl.org/group/perl.perl5.porters/2016/12/msg241877.html
Aaron Crane [Thu, 29 Dec 2016 12:48:38 +0000 (12:48 +0000)]
Fix tiny POD typo
David Mitchell [Wed, 28 Dec 2016 14:05:43 +0000 (14:05 +0000)]
Allow sv = &PL_sv_undef; sv_set_undef(sv) to work
RT #130385
Technically
sv = &PL_sv_undef;
....
sv_set_undef(sv)
is modifying a read-only variable and so should croak, but some XS code
relies on the behaviour previous to the introduction of sv_set_undef(),
where:
sv = &PL_sv_undef;
....
sv_setsv(sv, &PL_undef)
silently succeeds (sv_setsv() returns immediately if src and dst
addresses are the same).
Aristotle Pagaltzis [Tue, 27 Dec 2016 04:47:37 +0000 (05:47 +0100)]
Module::CoreList: clarify _undelta logic
Karl Williamson [Mon, 26 Dec 2016 17:43:13 +0000 (10:43 -0700)]
perlre, perlrequick: Note other pods
This revises the introductory text to link appropriately to other pods
that overlap their content.
Karl Williamson [Mon, 26 Dec 2016 17:36:39 +0000 (10:36 -0700)]
perlretut: Add some introductory remarks
In re-reading this, I realized that it assumed some basic knowledge, so
this commit adds text to explain what formerly was assumed.
David Mitchell [Mon, 26 Dec 2016 12:49:24 +0000 (12:49 +0000)]
split ' ', $foo: don't check end byte
The special-cased code to skip spaces at the start of the string
didn't check that s < strend, so relied on the string being \0-terminated
to work correctly. The introduction of the isSPACE_utf8_safe() macro
showed up this dodgy assumption by causing assert failures in regen.t
under LC_ALL=en_US.UTF-8 PERL_UNICODE="".
Dan Collins [Tue, 11 Oct 2016 18:54:16 +0000 (14:54 -0400)]
overload.pm: add a missing 'exists'
607ee4356 changed the hash of permitted ops from having '1' as a value
to having undef as a value. This also changed one of the warning points
from checking for truthiness to existence. However, a second warning
was accidentally left checking for truthiness. This commit fixes that
oversight, and adds a regression test for warnings in this case.
David Mitchell [Sun, 25 Dec 2016 20:14:41 +0000 (20:14 +0000)]
more issues with /(?{ ... <<EOF })/
RT #130398
My recent fix for issues with and /(?{...})/, v5.25.7-97-g98d5e3e,
broke Method-Signatures and possibly TryCatch.
This commit seems to fix them, but is based on observation rather
than any deep understanding of what's going on.
David Mitchell [Sun, 25 Dec 2016 12:14:10 +0000 (12:14 +0000)]
fix (*glob) = ()
RT #130385
The new sv_set_undef() function added by me with v5.25.7-12-ge03e82a
didn't handle undeffing a glob correctly, and gave an assertion failure.
Fix it to behave more exactly like (sv_setsv(sv, &PL_sv_undef),
which it is documented as being identical to.
James E Keenan [Sun, 25 Dec 2016 13:52:37 +0000 (08:52 -0500)]
Fix two broken links in perldelta.
Regenerate known_pod_issues.dat to reflect that fix.
Karl Williamson [Sat, 24 Dec 2016 22:12:37 +0000 (15:12 -0700)]
utf8.c: Avoid reinitializing
This code, recently added, initializes 2 inversion lists, but forgets
to save the results properly, so it gets reinitialized every time its
called.
Karl Williamson [Sat, 24 Dec 2016 21:54:54 +0000 (14:54 -0700)]
PATCH: [perl #130397] Rmv useless code
This code doesn't accomplish anything.
Spotted by Andy Lester.
James E Keenan [Sat, 24 Dec 2016 19:09:19 +0000 (14:09 -0500)]
Karl Williamson [Sat, 24 Dec 2016 17:31:10 +0000 (10:31 -0700)]
Fix win32 test failures
Commit
607313a19740cb756ab98d5e58e6040ea8c125d4 introduced a bug in that
it is looking for the string "mathoms.c" in __FILE__. But __FILE__ can
be a path with mathoms.c merely a component of it. The easiest thing to
do is to use instr() instead of strEQ.
Karl Williamson [Sat, 24 Dec 2016 17:51:38 +0000 (10:51 -0700)]
perldiag: Reinistate use of Z<>
Commit
3d6c5fec8cb3579a30be60177e31058bc31285d7 removed this pod
directive because of bugs in the pod handling code. This has been fixed
now, so this reinstates it. Also, real links have been created to this
entry.
Karl Williamson [Tue, 20 Dec 2016 20:41:58 +0000 (13:41 -0700)]
Deprecate non-grapheme string delimiter
In order for Perl to eventually allow string delimiters to be Unicode
grapheme clusters (which look like a single character, but may be
multiple ones), we have to stop allowing a single char delimiter that
isn't a grapheme by itself. These are unlikely to exist in actual code,
as they would typically display as attached to the character in front of
them, but we should be sure.
Karl Williamson [Tue, 20 Dec 2016 18:58:38 +0000 (11:58 -0700)]
Create inversion list for Assigned code points
This will be used in a future commit.
Karl Williamson [Mon, 19 Dec 2016 20:20:44 +0000 (13:20 -0700)]
regen/mk_invlists.pl: Create list of Assigned code points
This creates a read-only C array to be compiled into the perl source
text segment of an inversion list of the characters that are assigned in
the current Unicode version. This will be used in a future commit.
The difference listing is large because of defects in the diff algorithm
Karl Williamson [Mon, 19 Dec 2016 18:46:10 +0000 (11:46 -0700)]
Don't assume input UTF-8 is well-formed in to_utf8_case()
This is a deprecated function, but it still should check input validity
as best it can.
This also adds to the pod that it will be removed in 5.28.
Karl Williamson [Mon, 19 Dec 2016 18:23:22 +0000 (11:23 -0700)]
Deprecate toFOO_utf8()
Now that there are _safe versions, deprecate the unsafe ones.
Karl Williamson [Mon, 19 Dec 2016 18:12:48 +0000 (11:12 -0700)]
Convert core to use toFOO_utf8_safe()
Karl Williamson [Mon, 19 Dec 2016 01:05:46 +0000 (18:05 -0700)]
Add toFOO_utf8_safe() macros
Karl Williamson [Fri, 16 Dec 2016 03:11:00 +0000 (20:11 -0700)]
Convert some calls to test for malformations
Code review showed several places in core where a UTF-8 sequence that
was for a code point below 256 could be malformed, and be blindly
accepted. Convert these to use the similar macro that does the check.
One place in regexec.c was not converted because it is working on the
pattern, which perl should have generated itself, so very unlikely to be
bemalformed.
I didn't add tests for these, as it would be a pain to figure out
somehow to trigger them, and this is precautionary, based on code
reading rather than any known field experience.
Karl Williamson [Sun, 18 Dec 2016 23:33:08 +0000 (16:33 -0700)]
Don't assume input to case change macros is valid
Experience has shown that they can be invalid, and this commit now checks
for that. Further checking will be done in the next commit