This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
2 years agouse a buffer for is_cur_LC_category_utf8
Nicolas R [Wed, 26 Sep 2018 22:15:56 +0000 (17:15 -0500)]
use a buffer for is_cur_LC_category_utf8

avoid malloc/free when possible

2 years agoUpdates CPAN.pm to ANDK/CPAN-2.21-TRIAL.tar.gz
Andreas Koenig [Thu, 27 Sep 2018 06:06:34 +0000 (06:06 +0000)]
Updates CPAN.pm to ANDK/CPAN-2.21-TRIAL.tar.gz

2 years agoperldelta for 903b1101f7c2c55545e6cfd3eb5dfd564e1befd2
James E Keenan [Wed, 26 Sep 2018 14:40:55 +0000 (14:40 +0000)]
perldelta for 903b1101f7c2c55545e6cfd3eb5dfd564e1befd2

2 years agoRemove arybase support from B::Deparse
Dagfinn Ilmari Mannsåker [Mon, 4 Dec 2017 11:27:57 +0000 (11:27 +0000)]
Remove arybase support from B::Deparse

2 years agoRemove support for setting $[ to a non-zero value
Dagfinn Ilmari Mannsåker [Wed, 18 Oct 2017 00:01:11 +0000 (01:01 +0100)]
Remove support for setting $[ to a non-zero value

This removes arybase and all its surrounding machinery.

2 years agoperldelta for eda3f954e1ab
Tony Cook [Wed, 26 Sep 2018 05:09:13 +0000 (15:09 +1000)]
perldelta for eda3f954e1ab

2 years ago(perl #130674) don't modify $^H in vars.pm
Tony Cook [Wed, 1 Feb 2017 05:31:02 +0000 (16:31 +1100)]
(perl #130674) don't modify $^H in vars.pm

This could remove non-vars strictness from the caller.

2 years agoRemove perlweb bits from release manager's guide
John SJ Anderson [Tue, 25 Sep 2018 14:15:10 +0000 (07:15 -0700)]
Remove perlweb bits from release manager's guide

See <http://nntp.perl.org/group/perl.perl5.porters/252271> for
contextual detail around this removal.

2 years agoAvoid compiler warning showing up on darwin.
James E Keenan [Tue, 11 Sep 2018 00:30:11 +0000 (20:30 -0400)]
Avoid compiler warning showing up on darwin.

For example, in http://perl5.test-smoke.org/report/69659

2 years agoRemove B::Debug from core distribution.
James E Keenan [Sun, 23 Sep 2018 21:20:32 +0000 (17:20 -0400)]
Remove B::Debug from core distribution.

It continues to exist as a CPAN distribution.

Increment $B::Terse::VERSION and $B::Concise::VERSION due to changes in POD.

Remove internal links to B::Debug within two .pod files.

For: RT #130410

2 years agoamend sisyphus' email in Porting/checkAUTHORS.pl
sisyphus [Mon, 24 Sep 2018 15:03:32 +0000 (01:03 +1000)]
amend sisyphus' email in Porting/checkAUTHORS.pl

Committer: Retain contributor's superseded email address in 2nd column.
Re-alphabetize 1st column of Porting/checkAUTHORS.pl a little.

2 years agoamend sisyphus' email address in AUTHORS
sisyphus [Mon, 24 Sep 2018 15:03:10 +0000 (01:03 +1000)]
amend sisyphus' email address in AUTHORS

2 years agodefine HAS_LDEXPL in win32/config_H.gc
sisyphus [Sat, 22 Sep 2018 00:39:02 +0000 (10:39 +1000)]
define HAS_LDEXPL in win32/config_H.gc

2 years agodefine d_ldexpl in win32/config.gc
sisyphus [Sat, 22 Sep 2018 00:37:22 +0000 (10:37 +1000)]
define d_ldexpl in win32/config.gc

2 years agoregcomp.c: Fix typo in debug stmt
Karl Williamson [Sun, 23 Sep 2018 16:30:47 +0000 (10:30 -0600)]
regcomp.c: Fix typo in debug stmt

The name of the function was misspelled.

2 years agoChooser of the slain
Chris 'BinGOs' Williams [Fri, 21 Sep 2018 16:53:30 +0000 (17:53 +0100)]
Chooser of the slain

2 years agoUpdate Module-CoreList for v5.29.4 (shim)
Chris 'BinGOs' Williams [Fri, 21 Sep 2018 16:44:19 +0000 (17:44 +0100)]
Update Module-CoreList for v5.29.4 (shim)

2 years agot/uni/caller.t should declare its plan at run time
Nicolas R [Thu, 20 Sep 2018 21:06:52 +0000 (15:06 -0600)]
t/uni/caller.t should declare its plan at run time

Unit test should declare their test plan after
compilation when possible.

2 years agoAdjust t/op/stat.t when run from docker
Nicolas R [Thu, 20 Sep 2018 21:25:18 +0000 (15:25 -0600)]
Adjust t/op/stat.t when run from docker

Skipping tty tests on linux containers
like docker.

2 years agoMove the is_linux_container test helper to test.pl
Nicolas R [Thu, 20 Sep 2018 21:21:32 +0000 (15:21 -0600)]
Move the is_linux_container test helper to test.pl

op/getppid.t helper is_linux_container could be used
by other tests. In order to avoid multiple definitions
of that function and take advantage of any future changes
move that helper to test.pl which is used by most tests.

2 years agoperldelta for 12cad9bd9972
Tony Cook [Fri, 21 Sep 2018 05:56:07 +0000 (15:56 +1000)]
perldelta for 12cad9bd9972

2 years agobumping versions to 5.29.4
John SJ Anderson [Fri, 21 Sep 2018 03:35:56 +0000 (20:35 -0700)]
bumping versions to 5.29.4

2 years agonew perldelta for 5.29.4
John SJ Anderson [Fri, 21 Sep 2018 03:29:50 +0000 (20:29 -0700)]
new perldelta for 5.29.4

2 years agoupdate release_schedule for 5.29.3
John SJ Anderson [Fri, 21 Sep 2018 03:20:54 +0000 (20:20 -0700)]
update release_schedule for 5.29.3

2 years ago5.29.3 epigraph
John SJ Anderson [Fri, 21 Sep 2018 03:20:13 +0000 (20:20 -0700)]
5.29.3 epigraph

2 years agoMerge branch 'release-5.29.3' into blead
John SJ Anderson [Fri, 21 Sep 2018 03:12:16 +0000 (20:12 -0700)]
Merge branch 'release-5.29.3' into blead

2 years ago(perl #132655) nul terminate result of unpack "u" of invalid data
Tony Cook [Mon, 20 Aug 2018 06:31:45 +0000 (16:31 +1000)]
(perl #132655) nul terminate result of unpack "u" of invalid data

In the given test case, Perl_atof2() would run off the end of the PV,
producing an error from ASAN.

2 years agoAdd new release to perlhist v5.29.3
John SJ Anderson [Fri, 21 Sep 2018 00:00:21 +0000 (17:00 -0700)]
Add new release to perlhist

2 years agoUpdate Module::Corelist for 5.29.3
John SJ Anderson [Thu, 20 Sep 2018 23:31:10 +0000 (16:31 -0700)]
Update Module::Corelist for 5.29.3

2 years agoUpdate perldelta for 5.29.3
John SJ Anderson [Thu, 20 Sep 2018 22:50:25 +0000 (15:50 -0700)]
Update perldelta for 5.29.3

2 years agohandy.h: Silence compiler warning
Karl Williamson [Wed, 19 Sep 2018 21:38:09 +0000 (15:38 -0600)]
handy.h: Silence compiler warning

This warning was introduced in db54010671d6c27faf667d658073743b14cd9b58.
and is about comparing signed and unsigned results.  This commit casts
both operands to ptrdiff_t which is likely the widest signed type
available on the platform.  This can fail if the one of the operands is
greater than PTRDIFF_MAX.  But lots of other things can fail in that
case as well.  As the reply from Tomasz Konojacki in the thread starting
with http://nntp.perl.org/group/perl.perl5.porters/251541 points out,
compilers are now assuming that no object is larger than PTRDIFF_MAX,
and if they can assume that, so can we.

2 years agoCreate Ptrdiff_t type
Karl Williamson [Wed, 19 Sep 2018 21:31:34 +0000 (15:31 -0600)]
Create Ptrdiff_t type

which evaluates to SSize_t in the unlikely event that there isn't a
ptrdiff_t on the platform.  ptrdiff_t is safer than ssize_t, as the
latter need not contain any negative number besides -1.

2 years agoDon't overallocate space for /[foo]/
Karl Williamson [Wed, 19 Sep 2018 16:02:24 +0000 (10:02 -0600)]
Don't overallocate space for /[foo]/

The ANYOF regnode type (generated by bracketed character classes and
\p{}) was allocating too much space because the argument field was being counted twice

2 years agoBump Devel::PPPort in Changes file
Sawyer X [Wed, 19 Sep 2018 14:42:57 +0000 (17:42 +0300)]
Bump Devel::PPPort in Changes file

2 years agobump Devel::PPPort version from 3.42 to 3.43.
Karen Etheridge [Sat, 15 Sep 2018 23:27:58 +0000 (16:27 -0700)]
bump Devel::PPPort version from 3.42 to 3.43.

Its tests were modified in commit 1ddd2f5f.

2 years agofix grammar in perldelta entry
Karen Etheridge [Sat, 15 Sep 2018 23:18:06 +0000 (16:18 -0700)]
fix grammar in perldelta entry

2 years agoUpgrade perlfaq from version 5.20180605 to 5.0180915.
Karen Etheridge [Sat, 15 Sep 2018 22:31:49 +0000 (15:31 -0700)]
Upgrade perlfaq from version 5.20180605 to 5.0180915.

(Existing blead customizations are no longer needed.)

2 years agomore places where -I. for -MTestInit is needed
Slaven Rezic [Thu, 13 Sep 2018 11:29:27 +0000 (13:29 +0200)]
more places where -I. for -MTestInit is needed

2 years agoUpdate Archive-Tar to CPAN version 2.32
Chris 'BinGOs' Williams [Thu, 13 Sep 2018 09:01:40 +0000 (10:01 +0100)]
Update Archive-Tar to CPAN version 2.32

  [DELTA]

2.32  13/09/2018 (CBERRY)
- Fix absolute path handling on VMS

2 years agoSync dists with CPAN versions
Chris 'BinGOs' Williams [Thu, 13 Sep 2018 09:00:04 +0000 (10:00 +0100)]
Sync dists with CPAN versions

Both these have been released to CPAN recently.

2 years ago(perl #133510) can't use my_vsnprintf() on quadmath/threaded builds
Tony Cook [Thu, 13 Sep 2018 01:45:14 +0000 (11:45 +1000)]
(perl #133510) can't use my_vsnprintf() on quadmath/threaded builds

Since anything with quadmath should be recent enough to have
vsnprintf() I've fallen back to that.

Calls to PerlIO_debug() in core don't include floating point values
and I expect it to be unlikely outside of core - if it is needed
they'll just have to use double formatting/types.

2 years agoMerge branch 'sawyer/data-dumper-changes' into blead
Sawyer X [Wed, 12 Sep 2018 16:22:07 +0000 (19:22 +0300)]
Merge branch 'sawyer/data-dumper-changes' into blead

2 years agoRevised by Aaron Crane
Sawyer X [Wed, 12 Sep 2018 16:21:58 +0000 (19:21 +0300)]
Revised by Aaron Crane

2 years agoBump version of Data::Dumper
Sawyer X [Wed, 12 Sep 2018 15:50:02 +0000 (18:50 +0300)]
Bump version of Data::Dumper

2 years agoUpdate Changes file for Data::Dumper
Sawyer X [Wed, 12 Sep 2018 15:49:17 +0000 (18:49 +0300)]
Update Changes file for Data::Dumper

2 years agoFix preprocessor directive indentation
Dagfinn Ilmari Mannsåker [Fri, 10 Aug 2018 10:03:30 +0000 (11:03 +0100)]
Fix preprocessor directive indentation

2 years ago(perl #133510) use quadmath versions of log10, ldexp and signbit
Tony Cook [Wed, 12 Sep 2018 01:09:52 +0000 (11:09 +1000)]
(perl #133510) use quadmath versions of log10, ldexp and signbit

With -Dquadmath C++ builds, the calls to log10() and ldexp() would
cause ambiguous overloaded function errors, since all of log10(float),
log10(double) and log10(long double) were canidates for a
log10(__float128) call.  Similarly for ldexp().

signbit() had a different problem, two of the tests in ext/POSIX/t/math.t
failed with the default signbit() macro, presumably because the
__float128 was being converted to a long double, since the macro in
math.h didn't special case for __float128.

2 years agoutf8.c: Don't assume UTF-8 sequence has enough space.
Karl Williamson [Tue, 31 Jul 2018 04:09:12 +0000 (22:09 -0600)]
utf8.c: Don't assume UTF-8 sequence has enough space.

Instead use the end pointer passed in.

2 years agoFile::Path: sync with CPAN version 2.16
James E Keenan [Sat, 8 Sep 2018 23:51:26 +0000 (19:51 -0400)]
File::Path: sync with CPAN version 2.16

2 years agoUpdate release schedule
Sawyer X [Sat, 8 Sep 2018 13:38:16 +0000 (16:38 +0300)]
Update release schedule

2 years agoInsert missing 'T' to list of PERL5OPT switches.
James E Keenan [Tue, 4 Sep 2018 13:37:40 +0000 (09:37 -0400)]
Insert missing 'T' to list of PERL5OPT switches.

And, in passing, group upper- and lower-case switches properly.

For: RT 133044.  Thanks to contributor KES.

2 years agoCorrect typo in comment.
James E Keenan [Mon, 3 Sep 2018 22:05:27 +0000 (18:05 -0400)]
Correct typo in comment.

2 years agoThere is no getpw() function in User::grent.
James E Keenan [Mon, 3 Sep 2018 17:58:27 +0000 (13:58 -0400)]
There is no getpw() function in User::grent.

Documentation should refer to getgr(), per report from Elizabeth
Mattijsen.

Increment $VERSION.

For: RT 133217

2 years agoRemove superfluous variable $gr_mem.
James E Keenan [Mon, 3 Sep 2018 17:54:10 +0000 (13:54 -0400)]
Remove superfluous variable $gr_mem.

Per recommendation by Elizabeth Mattijsen.

For: RT 133217

2 years agoCorrect typo reported by Elizabeth Mattijsen
James E Keenan [Mon, 3 Sep 2018 17:52:38 +0000 (13:52 -0400)]
Correct typo reported by Elizabeth Mattijsen

For: RT 133217

2 years agoPATCH: [perl #133488] Fix grammer in perlfunc sysread()
Karl Williamson [Sun, 2 Sep 2018 13:59:45 +0000 (07:59 -0600)]
PATCH: [perl #133488] Fix grammer in perlfunc sysread()

Spotted by Axel Beckert

2 years agoAdd gcc-8 and gcc-9 for FORTIFY_SOURCE
H.Merijn Brand [Sun, 2 Sep 2018 09:00:16 +0000 (11:00 +0200)]
Add gcc-8 and gcc-9 for FORTIFY_SOURCE

2 years ago[perl #133468] Silence compiler warning
Andy Dougherty [Thu, 30 Aug 2018 16:02:22 +0000 (12:02 -0400)]
[perl #133468] Silence compiler warning

Commit 1a69c9a77a no longer uses S_invlist_set_len in ext/re/re_comp.c,
but didn't adjust embed.fnc accordingly.  This patch moves that function
into the #ifndef PERL_EXT_RE_BUILD block in embed.fnc.  It also
includes regenerated embed.h and proto.h files.

2 years agoCan't sing a song that's never been sung
Chris 'BinGOs' Williams [Thu, 30 Aug 2018 07:56:51 +0000 (08:56 +0100)]
Can't sing a song that's never been sung

2 years agoperldelta for 2460a4968c37
Tony Cook [Thu, 30 Aug 2018 05:35:13 +0000 (15:35 +1000)]
perldelta for 2460a4968c37

2 years ago(perl #132683) don't try to convert PL_sv_placeholder into a CV
Tony Cook [Wed, 21 Feb 2018 05:24:08 +0000 (16:24 +1100)]
(perl #132683) don't try to convert PL_sv_placeholder into a CV

Constant folding sets PL_warnhook to PERL_WARNHOOK_FATAL, which is
&PL_sv_placeholder, an undef SV.

If warn() is called while constant folding, invoke_exception_hook()
attempts to use the value of a non-NULL PL_warnhook as a CV, which
caused an undefined value warning.

invoke_exception_hook() now treats a PL_warnhook of PERL_WARNHOOK_FATAL
the same as NULL, falling back to the normal warning handling which
throws an exception to abort constant folding.

2 years agomulticoncat: mutator not seen in (lex = ...) .= ...
David Mitchell [Wed, 29 Aug 2018 13:32:24 +0000 (14:32 +0100)]
multiconcat: mutator not seen in (lex = ...) .= ...

RT #133441

TL;DR:
(($lex = expr1.expr2) .= expr3) was being misinterpreted as
(expr1 . expr2 . expr3) when the ($lex = expr1) subtree had had the
assign op optimised away by the OPpTARGET_MY optimisation.

Full details.

S_maybe_multiconcat() looks for suitable chains of OP_CONCAT to convert
into a single OP_MULTICONCAT.

Part of the code needs to distinguish between (expr . expr) and
(expr .= expr). This didn't used to be easy, as both are just OP_CONCAT
ops, but with the OPf_STACKED set on the second one. But...

perl also used to optimise ($a . $b . $c) into ($a . $b) .= $c, to
reuse the padtmp returned by the $a.$b concat. This meant that an
OP_CONCAT could have the OPf_STACKED flag on even when it was a '.'
rather than a '.='.

I disambiguated these cases by seeing whether the top op in the LHS
expression had the OPf_MOD flag set too - if so, it implies '.='.

This fails in the specific case where the LHS expression is a
sub-expression which is assigned to a lexical variable, e.g.

    ($lex = $a+$b) .= $c.

Initially the top node in the LHS expression above is OP_SASSIGN, with
OPf_MOD set due to the enclosing '.='. Then the OPpTARGET_MY
optimisation kicks in, and the ($lex = $a + $b) part of the optree is
converted from

    sassign sKPRMS
        add[t4] sK
            padsv[a$] s
            padsv[$b] s
        padsv[$lex] s

to
        add[$lex] sK/TARGMY
            padsv[a$] s
            padsv[$b] s

which is all fine and dandy, except that the top node of that optree no
longer has the OPf_MOD flag set, which trips up S_maybe_multiconcat into
no longer spotting that the outer concat is a '.=' rather than a '.'.

Whether the OPpTARGET_MY optimising code should copy the OPf_MOD from
the being-removed sassign op to its successor is an issue I won't
address here. But in the meantime, the good news is that for 5.28.0
I added the OPpCONCAT_NESTED private flag, which is set whenever
($a . $b . $c) is optimised into ($a . $b) .= $c. This means that it's
no longer necessary to inspect the OPf_MOD flag of the first child to
disambiguate the two cases. So the fix is trivial.

2 years agoBumping PathTools from 3.74 to 3.75
Sawyer X [Mon, 27 Aug 2018 20:32:06 +0000 (23:32 +0300)]
Bumping PathTools from 3.74 to 3.75

2 years agofix mkpath call to be compatible with older File::Path
Graham Knop [Mon, 27 Aug 2018 09:12:05 +0000 (11:12 +0200)]
fix mkpath call to be compatible with older File::Path

mkpath can be called multiple ways, but most aren't supported by very
old versions of File::Path.  A prerequisite could be added on a newer
version of the module that that supports the new call signature, but
this introduces a circular dependency.  While theoretically this
dependency should be resolvable, since the File::Spec prereq listed in
File::Path is version 0, some toolchains (in particular older CPAN.pm)
will fail to do so.

There isn't any particular advantage to using the new call signature, so
a simple solution is to adjust the test to use the older style.

2 years ago(perl #133326) fix and clarify handling of recurs_sv.
Tony Cook [Tue, 7 Aug 2018 05:34:06 +0000 (15:34 +1000)]
(perl #133326) fix and clarify handling of recurs_sv.

There were a few problems:

- the purpose of recur_sv wasn't clear, I believe I understand it
  now from looking at where recur_sv was actually being used.
  Frankly the logic of the code itself was hard to follow, apparently
  only counting a level if the recur_sv was equal to the current
  SV.

  Fixed by adding some documentation to recur_sv in the context
  structure.  The logic has been re-worked (see below) to hopefully
  make it more understandable.

- the conditional checks for inc/decrementing recur_depth didn't
  match between the beginnings and ends of the store_array() and
  store_hash() handlers didn't match, since recur_sv was both
  explicitly modified by those functions and implicitly modified
  in their recursive calls to process elements.

  Fixing by storing the starting value of cxt->recur_sv locally
  testing against that instead of against the value that might be
  modified recursively.

- the checks in store_ref(), store_array(), store_l?hash() were
  over complex, obscuring their purpose.

  Fixed by:
   - always count a recursion level in store_ref() and store the
     RV in recur_sv
   - only count a recursion level in the array/hash handlers if
     the SV didn't match.
   - skip the check against cxt->entry, if we're in this code
     we could be recursing, so we want to detect it.

- (after the other changes) the recursion checks in store_hash()/
  store_lhash() only checked the limit if the SV didn't match the
  recur_sv, which horribly broke things.

  Fixed by:
   - Now only make the depth increment conditional, and always
     check against the limit if one is set.

2 years ago[MERGE] various regex capture fixups
David Mitchell [Sun, 26 Aug 2018 20:10:16 +0000 (21:10 +0100)]
[MERGE] various regex capture fixups

Improve the code and macros in S_regmatch() to make opening and closing
captures (groups) more consistent and simpler.

Shouldn't make any changes to behaviour apart from improved debugging
output.

2 years agoImprove docs for lastparen, lastcloseparen
David Mitchell [Sun, 19 Aug 2018 12:55:30 +0000 (13:55 +0100)]
Improve docs for lastparen, lastcloseparen

There's lots of confusion here, especially about lastparen - some of
the docs are just plain wrong.

2 years agoS_regmatch: add debugging to UNWIND_PAREN()
David Mitchell [Sat, 18 Aug 2018 12:21:31 +0000 (13:21 +0100)]
S_regmatch: add debugging to UNWIND_PAREN()

(and tweak the debugging output of CLOSE_CAPTURE())

2 years agoS_rematch(): CLOSE_CAPTURE(): set last(close)paren
David Mitchell [Sat, 18 Aug 2018 11:49:12 +0000 (12:49 +0100)]
S_rematch(): CLOSE_CAPTURE(): set last(close)paren

Every use of the CLOSE_CAPTURE() macro is followed by the setting of
lastparen and lastcloseparen, so include these actions in the macro
itself.

2 years agoS_regmatch(): use CLOSE_CAPTURE() macro more
David Mitchell [Sat, 18 Aug 2018 11:40:08 +0000 (12:40 +0100)]
S_regmatch(): use CLOSE_CAPTURE() macro more

This macro includes debugging output, so by using it rather than
setting rex->offs[paren].start/end directly, you get better debugging.

2 years agoS_regmatch(): parameterise CLOSE_CAPTURE macro
David Mitchell [Sat, 18 Aug 2018 11:28:31 +0000 (12:28 +0100)]
S_regmatch(): parameterise CLOSE_CAPTURE macro

Make its index and start+end values into parameters. This will shortly
allow its use in other places, bringing consistent code and debug logging
to the whole of S_regmatch().

2 years agoS_regmatch(): move CLOSE_CAPTURE macro definition
David Mitchell [Sat, 18 Aug 2018 11:19:16 +0000 (12:19 +0100)]
S_regmatch(): move CLOSE_CAPTURE macro definition

Move this macro to earlier in the file to be with the other functions
and macros which deal with setting and restoring captures.

No changes (functional or textual) apart from the physical moving of the
13 lines.

2 years agoS_regmatch(): handle GOSUB within (.)* specially
David Mitchell [Thu, 16 Aug 2018 19:07:43 +0000 (20:07 +0100)]
S_regmatch(): handle GOSUB within (.)* specially

The (?n) mechanism allows you to 'gosub' to a subpattern delineated by
capture n. For 1-char-width repeats, such as a+, \w*?, (\d)*, then
currently the code checks whether it's in a gosub each time it attempts
to start executing the B part of A*B, regardless of whether the A is
in a capture.

This commit moves the GOSUB check to within the capture-only variant
(CURLYN), which then directly just looks for one instance of A and
returns. This moves the check away from more frequently called code
paths.

2 years agoadd more /(?1)/ tests
David Mitchell [Thu, 16 Aug 2018 18:24:23 +0000 (19:24 +0100)]
add more /(?1)/ tests

specifically, the code path wasn't being exercised where the gosub
goes to a capture which is a 1-char wide *non-greedy* repeat, such as

    / ... (\d)*? ... (?1) ... /

2 years agoS_regmatch(): combine CURLY_B_min/_known states
David Mitchell [Wed, 15 Aug 2018 17:02:53 +0000 (18:02 +0100)]
S_regmatch(): combine CURLY_B_min/_known states

There are currently two similar backtracking states for simple
non-greedy pattern repeats:

    CURLY_B_min
    CURLY_B_min_known

the latter is a variant of the former for when the character which must
follow the repeat is known, e.g.  /(...)*?X.../, which allows quick
skipping to the next viable position.

The code for the two cases:

    case CURLY_B_min_fail:
    case CURLY_B_min_known_fail:

share a lot of similarities. This commit merges the two states into a
single CURLY_B_min state, with an associated single CURLY_B_min_fail
fail state.

That one code block can handle both types, with a single

    if (ST.c1 == CHRTEST_VOID) ...

test to choose between the two variant parts of the code.

This makes the code smaller and more maintainable, at the cost of one
extra test per backtrack.

2 years ago5.29.2 was released
Sawyer X [Sun, 26 Aug 2018 12:13:14 +0000 (15:13 +0300)]
5.29.2 was released

2 years agoperlsyn: Be more explicit about what is faster
Eugen Konkov [Sat, 25 Aug 2018 16:52:49 +0000 (10:52 -0600)]
perlsyn: Be more explicit about what is faster

This paragraph can lead to ambiguity because it uses at example `for`
keyword but then says: Perl executes a foreach statement more rapidly
than it would the equivalent **for** loop.

2 years agoperldelta for b79cd7dfef
Steve Hay [Fri, 24 Aug 2018 14:52:17 +0000 (15:52 +0100)]
perldelta for b79cd7dfef

2 years agoTidy up Windows makefiles' handling of CCTYPE=SDK2003SP1
Steve Hay [Fri, 24 Aug 2018 14:38:01 +0000 (15:38 +0100)]
Tidy up Windows makefiles' handling of CCTYPE=SDK2003SP1

As noted in the comments at the top of each makefile, and again in the
README.win32, we only intended to support the 64-bit compiler, which was
the earliest MSVC x64 compiler available since neither VC6 nor VC7 had one.

2 years agoFix Windows build with CCTYPE=SDK2003SP1
Steve Hay [Fri, 24 Aug 2018 13:55:45 +0000 (14:55 +0100)]
Fix Windows build with CCTYPE=SDK2003SP1

The Platform SDK 2003 SP1 x64 compiler has _MSC_VER 1400 like MSVC80, but
doesn't define _configthreadlocale() in the /MD (MSVCRT.DLL) version of
the CRT used by perl. (Compare C:\Program Files\Microsoft Platform SDK for
Windows Server 2003 R2\src\crt\setlocal.c with C:\Program Files (x86)\
Microsoft Visual Studio 8\VC\crt\src\setlocal.c. The latter always defines
_configthreadlocale(), but the former only does so when _MT is defined.)

2 years agoPATCH: [perl #133468] Silence compiler warning
Karl Williamson [Thu, 23 Aug 2018 23:36:50 +0000 (17:36 -0600)]
PATCH: [perl #133468] Silence compiler warning

This inline function is no longer called from re_comp.c, so doesn't need
to be compiled there, as don't the surrounding functions

2 years agoRemove duplicate of commented-out test.
James E Keenan [Thu, 23 Aug 2018 15:01:33 +0000 (11:01 -0400)]
Remove duplicate of commented-out test.

2 years agoperldelta for Locale::Codes removal
Karl Williamson [Thu, 23 Aug 2018 15:00:13 +0000 (09:00 -0600)]
perldelta for Locale::Codes removal

2 years ago__Storable__.pm: Bump version to 3.13
Karl Williamson [Thu, 23 Aug 2018 14:59:31 +0000 (08:59 -0600)]
__Storable__.pm: Bump version to 3.13

2 years agofix Storable rethrowing refs when Log::Agent is installed
Graham Knop [Mon, 7 May 2018 11:50:53 +0000 (13:50 +0200)]
fix Storable rethrowing refs when Log::Agent is installed

Storable rethrows errors from its hooks, STORABLE_freeze, STORABLE_thaw,
and STORABLE_attach.  If those errors are refs, they should be preserved
in their original form.  Tests were added to ensure this in 06f586d.
However, when Log::Agent is installed, Storable uses it rather than just
calling Carp::croak.  Log::Agent's logcroak function always stringifies
the errors it gets when it throws them.  This causes test failures in
many cases when the dual life dist is installed from CPAN.

This is a bug in Log::Agent, but since it is long standing behavior in a
non-core module, it's reasonable to work around it in Storable.

A simple workaround is to trap the error thrown by Log::Agent, and throw
the original arguments given to our logcroak.

2 years agoFix Devel::PPPort with Visual Studio by quoting $0:
Sawyer X [Wed, 8 Aug 2018 16:34:30 +0000 (19:34 +0300)]
Fix Devel::PPPort with Visual Studio by quoting $0:

The following was raised by A. Sinan Unur on p5p:

    Recent versions of Devel::PPPort on Windows with Visual Studio built
    `perl` fail tests in t\mess.t because $0 is interpolated into regex
    patterns without the use of quotemeta[1].

    In this case, $0 contains `\` as directory separators.

    This is necessary, because nmake tries to interpret part of a filename
    as a command line argument if it contains `/` characters.

    An easy fix is to use \Q$0\E instead of plain $0 in patterns.

    Here's a test report:

    http://www.cpantesters.org/cpan/report/e484fd2f-6c51-1014-9811-fe131a8368d1

    HTH,

    -- Sinan

    [1]: https://www.nu42.com/2014/11/youve-gotta-quotemeta.html

Link: http://nntp.perl.org/group/perl.perl5.porters/250734
2 years agoMake porting tests pass after Locale::Codes removal
James E Keenan [Sun, 19 Aug 2018 03:08:34 +0000 (23:08 -0400)]
Make porting tests pass after Locale::Codes removal

And remove references to it.  This consists of:

1. Run ./perl -Ilib regen/lib_cleanup.pl.

2. Add links to Locale::Codes for podcheck

    This distribution is now removed from the core, so podcheck can't
    determine if they are valid or not without being told to do so.
    This was accomplished by:

    perl porting/podcheck.t --add_link Locale::Language
    perl porting/podcheck.t --add_link Locale::Country

3.  t/TEST: Remove Locale::Codes reference as it is no longer in core

4.  Porting/corelist-perldelta.pl: Remove Locale::Codes, as it is no
    longer in core

2 years agoRemove Locale-Codes from Perl 5 core distribution.
Sullivan Beck [Sun, 19 Aug 2018 02:12:56 +0000 (22:12 -0400)]
Remove Locale-Codes from Perl 5 core distribution.

For: RT 133458

2 years agoperlobj: Recommend perlreftut over perlref
Karl Williamson [Wed, 22 Aug 2018 02:54:48 +0000 (20:54 -0600)]
perlobj: Recommend perlreftut over perlref

This change was recommended by Ovid in 2018 TPCig

2 years agoregcomp.c: Silence compiler warning
Karl Williamson [Wed, 15 Aug 2018 22:26:00 +0000 (16:26 -0600)]
regcomp.c: Silence compiler warning

This may actually be a problem at times.  We need to cast to a boolean.

2 years agoUpdate epigraphs with v5.29.2
Chris 'BinGOs' Williams [Mon, 20 Aug 2018 21:54:54 +0000 (22:54 +0100)]
Update epigraphs with v5.29.2

2 years agoUpdate Module::CoreList for 5.29.3
Chris 'BinGOs' Williams [Mon, 20 Aug 2018 21:42:59 +0000 (22:42 +0100)]
Update Module::CoreList for 5.29.3

2 years agoBump the perl version in various places for 5.29.3
Chris 'BinGOs' Williams [Mon, 20 Aug 2018 21:38:31 +0000 (22:38 +0100)]
Bump the perl version in various places for 5.29.3

2 years agonew perldelta for 5.29.3
Chris 'BinGOs' Williams [Mon, 20 Aug 2018 21:23:53 +0000 (22:23 +0100)]
new perldelta for 5.29.3

2 years agoMerge branch 'release-5.29.2' into blead
Chris 'BinGOs' Williams [Mon, 20 Aug 2018 21:16:25 +0000 (22:16 +0100)]
Merge branch 'release-5.29.2' into blead

2 years agoFix missing space in perlguts C<< >> POD directive
Dagfinn Ilmari Mannsåker [Mon, 20 Aug 2018 19:52:16 +0000 (20:52 +0100)]
Fix missing space in perlguts C<< >> POD directive

2 years agoadd new release to perlhist v5.29.2
Chris 'BinGOs' Williams [Mon, 20 Aug 2018 19:11:35 +0000 (20:11 +0100)]
add new release to perlhist

2 years agoUpdate Module-CoreList for v5.29.2
Chris 'BinGOs' Williams [Mon, 20 Aug 2018 19:06:57 +0000 (20:06 +0100)]
Update Module-CoreList for v5.29.2

2 years agoFinalise perldelta
Chris 'BinGOs' Williams [Mon, 20 Aug 2018 19:01:06 +0000 (20:01 +0100)]
Finalise perldelta

2 years agoMake sv_setsv_flags accept an inversion list src
Karl Williamson [Wed, 15 Aug 2018 21:22:03 +0000 (15:22 -0600)]
Make sv_setsv_flags accept an inversion list src

Inversion lists are a type of SV, but aren't really convertible to other
types, nor has there been a need to.  But it makes things more
convenient for a future commit to allow one to just clobber whatever is
in an SV and replace it with an inversion list.

Even after this commit, there are restrictions to what the SV can have
that gets clobbered.  But this is a step towards more generality