This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
5 years agoperl.h: Fix typo in comment
Karl Williamson [Tue, 1 Jan 2019 02:42:32 +0000 (19:42 -0700)]
perl.h: Fix typo in comment

5 years agoperlvars.h: A variable was being initialized unnecessarily
Karl Williamson [Mon, 31 Dec 2018 04:13:35 +0000 (21:13 -0700)]
perlvars.h: A variable was being initialized unnecessarily

5 years agoperlre: Note /i multi-char fold lookbehind assertions don't work
Karl Williamson [Sun, 30 Dec 2018 17:57:59 +0000 (10:57 -0700)]
perlre: Note /i multi-char fold lookbehind assertions don't work

5 years agoregcomp.sym: Note specialized use of 'flags' in 2 OPs
Karl Williamson [Sun, 30 Dec 2018 17:18:43 +0000 (10:18 -0700)]
regcomp.sym: Note specialized use of 'flags' in 2 OPs

5 years agoperlre: Note that lookbehind is up to 255 chars
Karl Williamson [Sun, 30 Dec 2018 17:01:38 +0000 (10:01 -0700)]
perlre: Note that lookbehind is up to 255 chars

5 years agoCorrect spelling error.
James E Keenan [Sat, 29 Dec 2018 23:34:10 +0000 (18:34 -0500)]
Correct spelling error.

5 years agoregcomp.c: Refactor \b{} parsing code
Karl Williamson [Thu, 27 Dec 2018 20:12:29 +0000 (13:12 -0700)]
regcomp.c: Refactor \b{} parsing code

This just moves things around so that the information is kept in local
variables and the regnode not created until all that info has been
completely determined.  I believe it is clearer to read, but the impetus
came from the fact that prior to this commit, use of \b{} always
restarted the parse unnecessarily because the order of things made it
appear that a real /d op had appeared, whereas it was just the one
currently being constructed

5 years agoregcomp.c: White-space only
Karl Williamson [Fri, 28 Dec 2018 02:35:01 +0000 (19:35 -0700)]
regcomp.c: White-space only

Indent the block added by the previous commit

5 years agoregcomp.c: Avoid reading out-of-bounds memory
Karl Williamson [Fri, 28 Dec 2018 02:31:18 +0000 (19:31 -0700)]
regcomp.c: Avoid reading out-of-bounds memory

Recent commit c316b824875fdd5ce52338f301fb0255d843dfec introduced an
out-of-bounds memory read.  This commit fixes it.  An ANYOFH regnode
doesn't have a bitmap, so don't try to read it.

5 years agoregen/mk_invlists.pl: Rmv outdated code
Karl Williamson [Sun, 23 Dec 2018 01:36:27 +0000 (18:36 -0700)]
regen/mk_invlists.pl: Rmv outdated code

Before the GCB property handling got more complicated, it was possible
to represent its vagaries with a boolean table on early Unicode
releases.  Now there are more complicated rules, and even though early
releases only use 0 or 1, the rules exist and lead to compilation
errors.  Just remove the special handling, and let the table be U8.

5 years agoregen/mph.pl: Remove unused variable
Karl Williamson [Sun, 23 Dec 2018 00:22:42 +0000 (17:22 -0700)]
regen/mph.pl: Remove unused variable

5 years agoChange length-1 ASCII fold pairs to ANYOFM regnodes
Karl Williamson [Sat, 8 Dec 2018 22:39:24 +0000 (15:39 -0700)]
Change length-1 ASCII fold pairs to ANYOFM regnodes

A node that matches only 'A' and 'a', for example, can be turned into an
ANYOFM node, which is faster to execute.  This is done after joining of
adjacent EXACTFish nodes, as longer nodes are better than shorter ones,
including because they lessen the number of bugs with multi-char folds
not matching because of node boundaries.

But if a length 1 node remains, ANYOFM is better.

5 years agoregcomp.c: White-space only
Karl Williamson [Sat, 8 Dec 2018 14:08:25 +0000 (07:08 -0700)]
regcomp.c: White-space only

Indent newly formed block in previous commit

5 years agoAdd new regnode: ANYOFH, without a bitmap
Karl Williamson [Fri, 7 Dec 2018 00:18:25 +0000 (17:18 -0700)]
Add new regnode: ANYOFH, without a bitmap

This commit adds a regnode for the case where nothing in the bit map has
matches.  This allows the bitmap to be omitted, saving 32 bytes of
otherwise wasted space per node.  Many non-Latin Unicode properties have
this characteristic.  Further, since this node applies only to code
points above 255, which are representable only in UTF-8, we can
trivially fail a match where the target string isn't in UTF-8.  Time
savings also accrue from skipping the bitmap look-up.  When swashes are
removed, even more time will be saved.

5 years agoRevamp qr/[...]/ optimizations
Karl Williamson [Wed, 26 Dec 2018 05:56:48 +0000 (22:56 -0700)]
Revamp qr/[...]/ optimizations

This commit extensively changes the optimizations for ANYOF regnodes
that represent bracketed character classes.

The removal of the regex compilation pass now makes these feasible and
desirable.  Compilation now tries hard to optimize an ANYOF node into
something smaller and/or faster when feasible.

Now, qr/[X]/ for any single character or POSIX class X, and any
modifiers like /d, /i, etc, should be the same as qr/X/ for the same
modifiers, unless it would require the pattern to be upgraded from
non-UTF-8 to UTF-8, unless not doing so could introduce bugs.

These changes fix some issues with multi-character /i folding.

5 years agoregcomp.c: Rename a variable
Karl Williamson [Wed, 26 Dec 2018 05:53:37 +0000 (22:53 -0700)]
regcomp.c: Rename a variable

This is to distinguish it from another similar variable being introduced
in the next commit.

5 years agoregcomp.c: White-space, comments only
Karl Williamson [Wed, 28 Nov 2018 15:40:29 +0000 (08:40 -0700)]
regcomp.c: White-space, comments only

5 years agoregcomp.c: Refactor 3 variables into flags of 1
Karl Williamson [Wed, 28 Nov 2018 15:13:31 +0000 (08:13 -0700)]
regcomp.c: Refactor 3 variables into flags of 1

This makes the code easier to read, as it summarizes the purposes of the
three, and makes it easy to find which reason it is.

5 years agoregcomp.c: White space only
Karl Williamson [Tue, 27 Nov 2018 19:15:56 +0000 (12:15 -0700)]
regcomp.c: White space only

Indent after the previous commit created a new outer loop

5 years agoregcomp.c: Refactor looking for POSIX optimizations
Karl Williamson [Tue, 27 Nov 2018 18:59:03 +0000 (11:59 -0700)]
regcomp.c: Refactor looking for POSIX optimizations

Instead of repeating the code, slightly modified, this uses a loop.
This is in preparation for a future commit where a third instance would
have been required

5 years agoregcomp.c: Rename a variable
Karl Williamson [Tue, 27 Nov 2018 18:20:56 +0000 (11:20 -0700)]
regcomp.c: Rename a variable

The new name more accurately expresses the usage, as what gets generated
may not actually be an ANYOFD.

5 years agoregcomp.c: Remove no longer used static function
Karl Williamson [Sun, 2 Dec 2018 20:53:20 +0000 (13:53 -0700)]
regcomp.c: Remove no longer used static function

5 years agoregcomp.c: Remove remaining use of static function
Karl Williamson [Wed, 26 Dec 2018 19:28:45 +0000 (12:28 -0700)]
regcomp.c: Remove remaining use of static function

Commit 13dfc48da5322166f9d64a7349e3434c070ead88 removed one of two uses
of this function.  This removes the remaining one.  Commits in between
removed the need for most of the guts of the function.

5 years agoregcomp.c: Consolidate common code
Karl Williamson [Tue, 27 Nov 2018 18:12:15 +0000 (11:12 -0700)]
regcomp.c: Consolidate common code

These flags can be set in one place, rather than in multiple ones.

5 years agoregcomp.c: Simplify ANYOFM node generation
Karl Williamson [Tue, 27 Nov 2018 18:05:34 +0000 (11:05 -0700)]
regcomp.c: Simplify ANYOFM node generation

This refactors the code somewhat.  When we discover a deal-breaker code
point we can just break out of the loop (using a goto) instead of
setting a flag, continuing, and later testing it.

5 years agoregcomp.c: Don't zap larger scope variables
Karl Williamson [Tue, 27 Nov 2018 17:51:46 +0000 (10:51 -0700)]
regcomp.c: Don't zap larger scope variables

It doesn't matter currently, but it's best to declare more limited scope
variables for doing limited scope work, rather than using the more
global variable, which someday might want to be used later, outside the
block that zapped it, and would lead to a surprise.

5 years agoRemove ASCII/NASCII regnodes
Karl Williamson [Sat, 17 Nov 2018 19:45:24 +0000 (12:45 -0700)]
Remove ASCII/NASCII regnodes

The ANYOFM/NANYOFM regnodes are generalizations of these.  They have
more masks and shifts than the removed nodes, but not more branches, so
are effectively the same speed.  Remove the ASCII/NASCII nodes in favor
of having less code to maintain.

5 years agoregcomp.c: Prefer ANYOF/NANYOFM regnodes
Karl Williamson [Wed, 21 Nov 2018 05:22:56 +0000 (22:22 -0700)]
regcomp.c: Prefer ANYOF/NANYOFM regnodes

These two regnodes are faster than regular /[[:posix:]]/ ones, and some
of the latter are equivalent to some of the former.  So try the faster
optimizations first.

This commit just swaps the two blocks of code, and outdents
appropriately

5 years agoregcomp.c: Refactor some /[foo]/ code
Karl Williamson [Wed, 21 Nov 2018 04:49:16 +0000 (21:49 -0700)]
regcomp.c: Refactor some /[foo]/ code

This refactors the code that sees about optimizing bracketed character
classes into something else, so that the creating of the other regnode
is done closer to its determination, and only the really common code
actually is done in the common place, moved to the end of the function.
This removes the need for some 'elses' and 'ifs'

5 years agoregcomp.c: Simplify handling of EXACTFish nodes with 's' at edge
Karl Williamson [Thu, 20 Dec 2018 09:09:09 +0000 (02:09 -0700)]
regcomp.c: Simplify handling of EXACTFish nodes with 's' at edge

Commit 8a100c918ec81926c0536594df8ee1fcccb171da created node types for
handling an 's' at the leading edge, at the trailing edge, and at both
edges for nodes under /di that there is nothing else in that would
prevent them from being EXACTFU nodes.  If two of these get joined, it
could create an 'ss' sequence which can't be an EXACTFU node, for U+DF
would match them unconditionally.  Instead, under /di it should match
if and only if the target string is UTF-8 encoded.

I realized later that having three types becomes harder to deal with
when adding yet more node types, so this commit turns the three into
just one node type, indicating that at least one edge of the node is an
's'.

It also simplifies the parsing of the pattern and determining which node
to use.

5 years agoregexec.c: Avoid unnecessary folding
Karl Williamson [Wed, 19 Dec 2018 19:19:27 +0000 (12:19 -0700)]
regexec.c: Avoid unnecessary folding

Previous commits caused the pattern under /i to be folded as much as
possible.  This commit takes advantage of this by not folding when we
know it already has been folded.

5 years agoCollapse regnode EXACTFU_SS into EXACTFUP
Karl Williamson [Wed, 19 Dec 2018 18:21:28 +0000 (11:21 -0700)]
Collapse regnode EXACTFU_SS into EXACTFUP

EXACTFUP was created by the previous commit to handle a problematic case
in which not all the code points in an EXACTFU node are /i foldable at
compile time.  Doing so will allow a future commit to use the pre-folded
EXACTFU nodes (done in a prior commit), saving execution time for the
common case.  The only problematic code point is the MICRO SIGN.  Most
patterns don't use this character.

EXACTFU_SS is problematic in a different way.  It contains the sequence
'ss' which is folded to by LATIN SMALL LETTER SHARP S, but everything in
it can be pre-folded (unless it also contains a MICRO SIGN).  The reason
this is problematic is that it is the only non-UTF-8 node where the
length in folding can change.  To process it at runtime, the more
general fold equivalence function is used that is capable of handling
length disparities, but is slower than the functions otherwise used for
non-UTF-8.

What I've chosen to do for now is to make a single node type for all the
problematic cases (which at this time means just the two aforementioned
ones).  If we didn't do this, we'd have to add a third node type for
patterns that contain both 'ss' and MICRO.  Or artificially split the
pattern so the two never were in the same node, but we can't do that
because it can cause bugs in handling multi-character folds.  If more
special handling is found to be needed, there'd be a combinatorial
explosion of additional node types to handle all possible combinations.

What this effectively means is that the slower, more general foldEQ
function is used for portions of patterns containing the MICRO sign when
the pattern isn't in UTF-8, even though there is no inherent reason to
do so for non-UTF-8 strings that don't also contain the 'ss' sequence.

5 years agoAdd regnode EXACTFUP, for problematic
Karl Williamson [Sun, 23 Dec 2018 20:33:07 +0000 (13:33 -0700)]
Add regnode EXACTFUP, for problematic

If a non-UTF-8 pattern contains a MICRO SIGN, this special node is now
created.  This character is the only one not needing UTF-8 to represent,
but its fold does need UTF-8, which causes some issues, so it has to be
specially handled.  When matching against a non-UTF-8 target string, the
pattern is effectively folded, but not if the target is UTF-8.  By
creating this node, we can remove the special handling required for the
nodes that don't have a MICRO SIGN, in a future commit.

5 years agoregexec.c: Most /iaa nodes are now pre-folded
Karl Williamson [Sun, 23 Dec 2018 20:10:09 +0000 (13:10 -0700)]
regexec.c: Most /iaa nodes are now pre-folded

So, we don't have to re-fold them.

Previous commits have caused any EXACTFAA nodes to be pre-folded, and we
now have the infrastructure in regexec.c to take advantage of this,
including in non-UTF-8 patterns.  This commit changes to do this.

The only non-pre-folded EXACTFAA nodes are those that are not UTF-8, but
the target string is.  The reason is that the MICRO SIGN folds to
something representable only in UTF-8, so if you have both non-UTF-8, it
effectively is folded, and if you have the pattern in UTF-8, it gets
folded to the proper character.

In order for non-UTF-8 /iaa nodes to always be fully folded, there would
need to be a separate node for ones that contain the MICRO SIGN, and
then only that one wouldn't be considered folded when the target is
UTF-8.  I don't think it's worth it, as the only gain would be in
matching a non-UTF-8 /iaa node against a UTF-8 target string.  I suspect
/iaa will be used mostly in non-UTF8 target strings.  Comments have been
added to point this out in case someone thinks it should be implemented.

5 years agoregexec.c: Add function to compare /i Latin1, pre-folded
Karl Williamson [Wed, 19 Dec 2018 18:14:58 +0000 (11:14 -0700)]
regexec.c: Add function to compare /i Latin1, pre-folded

This adds a function like Perl_foldEQ_latin1(), but the second string is
assumed to be pre-folded.  I made it a static function in the only file
that uses it, regexec.c, to take advantage of the C optimizer.

More traditionally would be to make a new API function which takes a
flags parameter.  But the whole purpose of this is speed, and so I chose
not to go that route.

5 years agoregcomp.c: Fold characters in non-UTF-8 EXACTFish nodes
Karl Williamson [Sun, 23 Dec 2018 18:51:03 +0000 (11:51 -0700)]
regcomp.c: Fold characters in non-UTF-8 EXACTFish nodes

Prior to this commit, only in isolated circumstances were characters
folded at compile time in non-UTF-8 nodes.  By folding them here,
somewhat fewer instructions need be done at match time.  A future commit
will implement that.

5 years agoregcomp.c: Generate EXACTFU_SS only for non-UTF8
Karl Williamson [Sun, 16 Dec 2018 04:10:44 +0000 (21:10 -0700)]
regcomp.c: Generate EXACTFU_SS only for non-UTF8

It turns out that now, the regular methods for handling multi-character
folds work for the ones involving LATIN SMALL LETTER SHARP S when the
pattern is in UTF-8.  So the special code for handling this case can be
removed, and a regular EXACTFU node is generated.  This has the
advantage of being trie-able, and requiring fewer operations at run
time, as the pattern is pre-folded at compile time, and doesn't have to
be re-folded during each backtracking at run-time.

This means that the EXACTFU_SS node type will only be generated for
non-UTF-8 patterns, and the handling of it is unchanged in these cases.

5 years agoregcomp.c: Avoid duplicate work
Karl Williamson [Tue, 25 Dec 2018 19:17:08 +0000 (12:17 -0700)]
regcomp.c: Avoid duplicate work

By setting a variable, we can place some subsequent code into an else,
avoiding duplication of work.  (Perhaps the compiler optimizers already
figure this out.)

5 years agoregcomp.c: Rationalize use of two variables
Karl Williamson [Tue, 25 Dec 2018 19:20:25 +0000 (12:20 -0700)]
regcomp.c: Rationalize use of two variables

I didn't fully understand the use of two variables that deal with /u in
regular expression pattern compilation when I commited
1a26cbcb0358334c3eb1941a919ffdb57eb4fe7e.

RExC_uni_semantics is used to say that there is something in the pattern
that indicates it is supposed to use /u if /d would otherwise be
selected.  Once set, it cannot be cleared.

UNI_SEMANTICS means if we are operating under /u.  Code forbids /d to be
selected if RExC_uni_semantics is set, but we could select /l, /a, or
/aa, so we don't have to be in /u (and hence UNI_SEMANTICS) if
RExC_uni_semantics is set.  We just can't be in /d.

This commit adds comments, and fixes things to match the above
description.

5 years agot/re/anyof.t: Sort tests; remove dups
Karl Williamson [Wed, 26 Dec 2018 17:46:45 +0000 (10:46 -0700)]
t/re/anyof.t: Sort tests; remove dups

This makes it easier to add new tests without duplicating, as witnessed
by the duplicate ones this commit removes

5 years agoregexec.c: Swap parameters to some EQ functions
Karl Williamson [Wed, 19 Dec 2018 04:14:45 +0000 (21:14 -0700)]
regexec.c: Swap parameters to some EQ functions

This is in preparation for a future commit where the 2nd parameter will
be folded and can use the EQ functions calls which will allow for that.

5 years agoGeneralize foldEQ_utf8_flags()
Karl Williamson [Wed, 19 Dec 2018 04:08:57 +0000 (21:08 -0700)]
Generalize foldEQ_utf8_flags()

Prior to this commit, the second string parameter had to be UTF-8
encoded on input if it was pre-folded.  This commit removes that
restriction, but leaving it in place for the first string parameter.
Should we ever have both parameters possibly pre-folded, we would make
the same change to the first parameter, but now, the parameters can just
be swapped if necessary to meet this restriction, with no loss of
generality.  This saves a few instructions.

5 years agoFix bug in foldEQ_utf8_flags()
Karl Williamson [Sun, 23 Dec 2018 20:05:33 +0000 (13:05 -0700)]
Fix bug in foldEQ_utf8_flags()

We need to pass the flag that says to not allow non-ASCII characters to
fold to ASCII on to the code that actually does it.  There are
apparently no current errors that arise from this bug, but a future
commit would otherwise expose this problem.

5 years agoutf8.c: White-space only
Karl Williamson [Wed, 19 Dec 2018 04:05:27 +0000 (21:05 -0700)]
utf8.c: White-space only

Vertically align some conditionals, and add some space for visibility

5 years agoregcomp.c, regexec.c: Rename some related variables
Karl Williamson [Sat, 22 Dec 2018 04:10:26 +0000 (21:10 -0700)]
regcomp.c, regexec.c: Rename some related variables

The new names are shorter and more meaningful.

5 years agoregcomp.c: Shorten variable name
Karl Williamson [Fri, 21 Dec 2018 19:55:08 +0000 (12:55 -0700)]
regcomp.c: Shorten variable name

Change 'has_upper_latin1_only_utf8_matches' to
'upper_latin1_only_utf8_matches ', as the initial 'has_' is unnecessary
and somewhat misleading in spots

5 years agoChange name of PL_NonL1NonFinalFold
Karl Williamson [Wed, 19 Dec 2018 18:00:10 +0000 (11:00 -0700)]
Change name of PL_NonL1NonFinalFold

The inversion list this refers to now includes the Latin 1 range, so the
name was misleading.

5 years agoMove 2 property defns to mktables
Karl Williamson [Sun, 23 Dec 2018 05:02:27 +0000 (22:02 -0700)]
Move 2 property defns to mktables

These 2 Unicode-like property definitions used internally by the regular
expression compiler are moved by this commit from regen/mk_invlists.pl
to lib/unicore/mktables.

By placing all these in the same place, maintainers only have to learn
one bit of code, instead of two.

5 years agoregen/mk_invlists.pl: Fix bug when 2 ident tables
Karl Williamson [Sun, 23 Dec 2018 04:32:55 +0000 (21:32 -0700)]
regen/mk_invlists.pl: Fix bug when 2 ident tables

If two tables are identical, the code created a #define of one index of
a pointer array to be the other index.  But in some cases, that's not sufficient,
and the actual pointer must be defined in terms of the other.  This
showed up in compiling perl with an early Unicode version, but the
circumstances could arise again in a future version.

5 years agoregcomp.c: Avoid a NULL dereference
Karl Williamson [Thu, 20 Dec 2018 18:01:54 +0000 (11:01 -0700)]
regcomp.c: Avoid a NULL dereference

This refactors the code so that it doesn't refer to an object before it
makes sure it exists and isn't empty.  This hasn't been a problem in the
past, but a future commit will call this subroutine with parameters that
expose this bug.

5 years agoChange name of PL_utf8_foldable variable
Karl Williamson [Wed, 19 Dec 2018 17:13:27 +0000 (10:13 -0700)]
Change name of PL_utf8_foldable variable

This variable's name was out-of-date and misleading.  It is the name of
an inversion list that contains all the code points in the current
version of Unicode that participate in any way in a /i type of fold.

5 years agoregcomp.c: qr/[\xFF]/di doesn't have runtime dependencies
Karl Williamson [Fri, 21 Dec 2018 15:59:04 +0000 (08:59 -0700)]
regcomp.c: qr/[\xFF]/di doesn't have runtime dependencies

Prior to this commit, a class containing U+FF, LATIN SMALL LETTER Y WITH
DIAERESIS, generated an ANYOFD regnode because it thought that what
matched depended on the UTF-8ness of the target string.  But it doesn't.
No bugs were introduced because when ANYOFD is encountered the code
looks at some flags to determine what sorts of dependencies to further
look for, and the flags remained clear.  But ANYOFD is less desirable
than plain ANYOF, because it adds extra branches to execute.

Tests for this fix will be added in a future commit.

5 years agoregcomp.c: Add #ifdef
Karl Williamson [Sun, 23 Dec 2018 04:21:57 +0000 (21:21 -0700)]
regcomp.c: Add #ifdef

If perl is compiled on an early enough Unicode release, these won't be
defined, but since they're only used in deprecated functions, we can
just #ifdef them away.

5 years agoregcomp.c: Fix comment
Karl Williamson [Wed, 19 Dec 2018 19:45:47 +0000 (12:45 -0700)]
regcomp.c: Fix comment

This comment was out-of-date

5 years agore/anyof.t: Extract code into a function
Karl Williamson [Sat, 22 Dec 2018 19:14:38 +0000 (12:14 -0700)]
re/anyof.t: Extract code into a function

This is in preparation for a future commit where it will be used in more
than one place.

5 years agot/re/anyof.t: Add capability to utf8::upgrade()
Karl Williamson [Sat, 22 Dec 2018 18:00:54 +0000 (11:00 -0700)]
t/re/anyof.t: Add capability to utf8::upgrade()

ANYOF nodes can generate different things depending on the UTF-8ness of
the pattern.  This adds the capability of conveniently specifying in a
test that the pattern should be upgraded

5 years agot/re/anyof.t: Add 'strict', 'warnings' pragmas
Karl Williamson [Sat, 22 Dec 2018 05:06:15 +0000 (22:06 -0700)]
t/re/anyof.t: Add 'strict', 'warnings' pragmas

5 years agoregexec.c: Make sure variable is initialized
Karl Williamson [Sat, 22 Dec 2018 20:55:15 +0000 (13:55 -0700)]
regexec.c: Make sure variable is initialized

I don't think this is required, but I think some compiler complained
about it (but this commit is being made too long after I changed the
line for me to remember for sure).

5 years agoregexec.c: White space only, comment only
Karl Williamson [Sat, 22 Dec 2018 20:50:26 +0000 (13:50 -0700)]
regexec.c: White space only, comment only

This commit removes some obsolete comments

5 years agoUnicode-Normalize on CPAN is 1.26
Chris 'BinGOs' Williams [Sun, 23 Dec 2018 14:11:46 +0000 (14:11 +0000)]
Unicode-Normalize on CPAN is 1.26

5 years agoUpdate DB_File to CPAN version 1.843
Chris 'BinGOs' Williams [Sun, 23 Dec 2018 14:10:06 +0000 (14:10 +0000)]
Update DB_File to CPAN version 1.843

  [DELTA]

1.843 2 November 2018

   * hints file (sourced from
     http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/lang/perl5/files/)
     Highlighed by Sevan Janiyan <venture37@geeklan.co.uk>

        hints/bitrig.pl
        hints/netbsd.pl
        hints/minix.pl
        hints/openbsd.pl

5 years agoUpdate CPAN to CPAN version 2.22
Chris 'BinGOs' Williams [Sun, 23 Dec 2018 14:07:55 +0000 (14:07 +0000)]
Update CPAN to CPAN version 2.22

  [DELTA]

2018-12-23  k  <andk@cpan.org>

  * release 2.22

  * one week after the TRIAL release cpantesters have produced 306
  pass and 0 fail reports on 157 different configurations

  * no functional change over 2.22-TRIAL; only one change in the
  distroprefs directory which is not used per default and a minor
  change in the Makefile.PL to ensure that the signature for the
  tarball is produced with the current version of Module::Signature.

2018-12-16  k  <andk@cpan.org>

  * release 2.22-TRIAL

  * fix: erroneous propagation from build_requires to requires
  (Andreas Koenig)

  * fix: ensure that the post install hook is always called (Andreas
  Koenig)

  * fix: the single blank line output that initializing CPAN does
  when it's not having to report anything (Achim Gratz)

  * doc fix: Correct spelling of Perl 5 command-line switch (James E
  Keenan)

  * doc fix: clarify use of pop/splice in the manpage of the
  Specfile plugin (Andreas Koenig)

  * a tiny amount of new and updated distroprefs files

5 years agoIt's beginning to look a lot like Christmas
Chris 'BinGOs' Williams [Fri, 21 Dec 2018 09:50:55 +0000 (09:50 +0000)]
It's beginning to look a lot like Christmas

5 years agobump $File::Find::VERSION
Tony Cook [Wed, 19 Dec 2018 22:41:47 +0000 (09:41 +1100)]
bump $File::Find::VERSION

5 years agoFile::Find: set $Is_Win32 and $Is_VMS variables
Tomasz Konojacki [Wed, 19 Dec 2018 15:18:15 +0000 (16:18 +0100)]
File::Find: set $Is_Win32 and $Is_VMS variables

f75dfdbdb9d52b3024db9a0eb27405c2175af144 has mistakenly removed
the code that initialized those variables.

[perl #133731]

5 years agoThoroughly test paragraph mode
James E Keenan [Thu, 13 Dec 2018 23:29:29 +0000 (18:29 -0500)]
Thoroughly test paragraph mode

For: RT # 133722

5 years agoMore specific documentation of paragraph mode.
James E Keenan [Thu, 13 Dec 2018 22:42:42 +0000 (17:42 -0500)]
More specific documentation of paragraph mode.

For: RT # 133722

5 years agoRelease managers guide: perlivp isn't in utils after install.
Abigail [Tue, 18 Dec 2018 14:08:45 +0000 (15:08 +0100)]
Release managers guide: perlivp isn't in utils after install.

It's installed in the same directory (bin) as perl it self.

5 years agoTick release schedule
Abigail [Tue, 18 Dec 2018 14:06:53 +0000 (15:06 +0100)]
Tick release schedule

5 years agoUpdate Module::CoreList for 5.29.7
Abigail [Tue, 18 Dec 2018 13:48:59 +0000 (14:48 +0100)]
Update Module::CoreList for 5.29.7

5 years agoBump the perl version in various places for 5.29.7
Abigail [Tue, 18 Dec 2018 13:44:49 +0000 (14:44 +0100)]
Bump the perl version in various places for 5.29.7

5 years agoNew perldelta for 5.29.7
Abigail [Tue, 18 Dec 2018 13:32:27 +0000 (14:32 +0100)]
New perldelta for 5.29.7

5 years agoEpigraph for 5.29.6
Abigail [Tue, 18 Dec 2018 13:17:06 +0000 (14:17 +0100)]
Epigraph for 5.29.6

5 years agoPerlhist: Date of the 5.29.6 release. v5.29.6
Abigail [Tue, 18 Dec 2018 00:29:00 +0000 (01:29 +0100)]
Perlhist: Date of the 5.29.6 release.

5 years agoPerlhist: Fix the release dates for 5.29.[345].
Abigail [Tue, 18 Dec 2018 00:25:21 +0000 (01:25 +0100)]
Perlhist: Fix the release dates for 5.29.[345].

These releases were made in 2018, not 2019.

5 years agoPerldelta: Don't put a reference to an RT ticket in its own paragraph.
Abigail [Tue, 18 Dec 2018 00:21:42 +0000 (01:21 +0100)]
Perldelta: Don't put a reference to an RT ticket in its own paragraph.

5 years agoPerldelta: Linkefy references to Perl RT tickets in the Modules section.
Abigail [Tue, 18 Dec 2018 00:20:31 +0000 (01:20 +0100)]
Perldelta: Linkefy references to Perl RT tickets in the Modules section.

5 years agoErrata in perldelta.
Abigail [Tue, 18 Dec 2018 00:13:28 +0000 (01:13 +0100)]
Errata in perldelta.

A change in 5.29.4 was misworded in its perldelta. Karl fixed the wording
in perl5294delta, and added the corrected text in this perldelta, under
the Core Enhancements section.

The Errata section is more appropriate.

5 years agoPerldelta: New/Updated Modules for 5.29.6
Abigail [Tue, 18 Dec 2018 00:03:34 +0000 (01:03 +0100)]
Perldelta: New/Updated Modules for 5.29.6

5 years agoPerldelta: Acknowledgements for 5.29.6.
Abigail [Mon, 17 Dec 2018 23:38:08 +0000 (00:38 +0100)]
Perldelta: Acknowledgements for 5.29.6.

5 years agoUpdate Module::CoreList for 5.29.6
Abigail [Mon, 17 Dec 2018 23:25:14 +0000 (00:25 +0100)]
Update Module::CoreList for 5.29.6

5 years agoperldelta notes for Storable, EU::PXS, and sort the modules.
Tony Cook [Sun, 16 Dec 2018 23:15:25 +0000 (10:15 +1100)]
perldelta notes for Storable, EU::PXS, and sort the modules.

5 years agoperldelta for f75dfdbdb9d5
Tony Cook [Sun, 16 Dec 2018 22:42:47 +0000 (09:42 +1100)]
perldelta for f75dfdbdb9d5

5 years ago(perl #133673) disable the File::Find nlink optimization by default
Tony Cook [Mon, 10 Dec 2018 04:38:54 +0000 (15:38 +1100)]
(perl #133673) disable the File::Find nlink optimization by default

This will also fix 128894 and 126144.

5 years agoregcomp.c: Tighten embedded patterns in regex sets
Karl Williamson [Sun, 16 Dec 2018 19:38:28 +0000 (12:38 -0700)]
regcomp.c: Tighten embedded patterns in regex sets

In the (?[ ... ]) regex sets features, one can embed another compiled
regex set pattern.  Such compiled patterns always have a flag of '^',
which we weren't looking for prior to this commit.  That meant that
uncompiled patterns would be mistaken for compiled ones.

5 years agoperlrecharclass: Clarify embedding in regex sets
Karl Williamson [Sun, 16 Dec 2018 19:36:02 +0000 (12:36 -0700)]
perlrecharclass: Clarify embedding in regex sets

5 years agoperlre: Italicize variable text
Karl Williamson [Sun, 16 Dec 2018 19:33:15 +0000 (12:33 -0700)]
perlre: Italicize variable text

5 years agoPerldelta: Clarify when CVE-2018-18312 was fixed.
Abigail [Sun, 16 Dec 2018 19:12:24 +0000 (20:12 +0100)]
Perldelta: Clarify when CVE-2018-18312 was fixed.

This was originally fixed in 5.29.4. The patch itself does have
an entry in the perldelta for 5.29.4, but it was, intentionally,
not made clear a security hole was fixed. This was delayed until
5.28.1 and 5.26.3 were released.

5 years agoCorrect previous perldelta entry, and add a test
Karl Williamson [Sun, 16 Dec 2018 18:54:03 +0000 (11:54 -0700)]
Correct previous perldelta entry, and add a test

The text of perl5294delta was wrong about a change.  This commit changes
that text, and adds an entry to the latest perldelta with the
correction.  A test has been added to verify the way things work.

The wrong language led to this blog post, and my comment in it:
https://www.effectiveperlprogramming.com/2018/12/perl-v5-30-lets-you-match-more-with-the-general-quantifier/

5 years agoAdd perldelta entry for pipe open fixes
Leon Timmermans [Sun, 16 Dec 2018 18:36:16 +0000 (19:36 +0100)]
Add perldelta entry for pipe open fixes

This covers c6fe5b981b942ddabb23ed4b7602067e906e6d88
and 30c869b87739b56280daca3cd44b0588144747b7

5 years agoAlways mark pipe in list pipe-open as inherit-on-exec
Leon Timmermans [Sun, 16 Dec 2018 00:05:06 +0000 (01:05 +0100)]
Always mark pipe in list pipe-open as inherit-on-exec

This is the my_popen_list counterpart of
c6fe5b981b942ddabb23ed4b7602067e906e6d88

5 years agoGet pod/perldelta in shape.
Abigail [Sat, 15 Dec 2018 23:27:51 +0000 (00:27 +0100)]
Get pod/perldelta in shape.

* Fixed POD issues.
* Fixed spelling.
* Removed most of the templating stuff; only the Module List and
  Acknowledgment are left -- they will be done at the day of the release.

5 years agoPerldelta entries for 5.29.6.
Abigail [Sat, 15 Dec 2018 17:34:40 +0000 (18:34 +0100)]
Perldelta entries for 5.29.6.

5 years agoAlways mark pipe in pipe-open as inherit-on-exec
Leon Timmermans [Sat, 15 Dec 2018 18:08:41 +0000 (19:08 +0100)]
Always mark pipe in pipe-open as inherit-on-exec

Since 2cdf406a a lot of file descriptors are opened close-on-exec,
including the pipe that is passed to the child process in a pipe-open.
This is usually fine because a dup2 follows to rename that handle to
stdin/stdout that will set the inherit-on-exec. However, if the pipe
descriptor already has the right value, for example because stdin was
closed, then no dup2 happens and hence it's still marked as
close-on-exec right when we want to perform an exec.

This patch explicitly marks such a handle as inherit-on-exec, to ensure
it will be open for the child process.

5 years agoAvoid "Use of uninitialized value $res in numeric eq (==)" warning
James E Keenan [Sat, 15 Dec 2018 15:29:12 +0000 (10:29 -0500)]
Avoid "Use of uninitialized value $res in numeric eq (==)" warning

The test within the SKIP block expects $res to be undef, but the 'skip'
condition itself expects it to be defined and numeric.  So we were
getting an uninitialized value warning.  In 'skip' condition, test for
definedness before numeric comparison.

5 years agoCorrect spelling error in 'skip' message
James E Keenan [Sat, 15 Dec 2018 14:01:55 +0000 (09:01 -0500)]
Correct spelling error in 'skip' message

5 years agot/io/eintr.t: Skip some tests on pre-16 Darwin.
Abigail [Sat, 15 Dec 2018 12:24:08 +0000 (13:24 +0100)]
t/io/eintr.t: Skip some tests on pre-16 Darwin.

The tests where we write a string larger than the pipe size to
a pipe hang on 15.6.0, while they seem to work on Darwin 17.7.0.
So we will skip these tests on Darwin, if the major version is
less than 16. (We may adjust this is we have more reports on
which versions between 15.6.0 and 17.7.0 success/fail).

Note that the tests hang even if we send a string of 512 characters,
which is much, much smaller than the actual size of the string in
the test.

5 years agoUpdate Config::Perl::V to version 0.31
H.Merijn Brand [Sat, 15 Dec 2018 12:33:49 +0000 (13:33 +0100)]
Update Config::Perl::V to version 0.31

Adds USE_THREAD_SAFE_LOCALE

5 years agoext/GDBM_File/t/fatal.t: handle non-fatality
David Mitchell [Fri, 14 Dec 2018 16:54:42 +0000 (16:54 +0000)]
ext/GDBM_File/t/fatal.t: handle non-fatality

This script is supposed to exercise the error handling callback
mechanism in gdbm, by triggering an error by surreptitiously closing
the file handle which gdbm has opened.

However, this doesn't trigger an error in newer releases of the gdbm
library, which uses mmap() rather than write() etc. In fact I can't see
any way of triggering an error: so just skip the relevant tests if we
can't trigger a failure.

5 years agoS_uiv_2buf: faster integer stringification algorithm
Tomasz Konojacki [Thu, 29 Nov 2018 11:24:03 +0000 (12:24 +0100)]
S_uiv_2buf: faster integer stringification algorithm

Processing two digits at a time results in noticeable performance
improvement for larger numbers.

The previous version of the function was being automatically inlined
by gcc because of its small size. It's no longer the case so I had to
use PERL_STATIC_INLINE.

I have marked the UV branch as UNLIKELY because UVs are *much* rarer
than IVs.

[perl #133691]