This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
6 years agoPatch suggested by Craig Berry for RT 131337.
James E Keenan [Mon, 22 May 2017 02:16:23 +0000 (22:16 -0400)]
Patch suggested by Craig Berry for RT 131337.

6 years agoUpdate Module::CoreList for 5.27.1
David Mitchell [Sat, 3 Jun 2017 07:54:01 +0000 (08:54 +0100)]
Update Module::CoreList for 5.27.1

6 years agoBump the perl version in various places for 5.27.1
David Mitchell [Sat, 3 Jun 2017 07:24:12 +0000 (08:24 +0100)]
Bump the perl version in various places for 5.27.1

6 years agoUse new paradigm for hdr file double inclusion guard
Karl Williamson [Thu, 20 Apr 2017 16:16:11 +0000 (10:16 -0600)]
Use new paradigm for hdr file double inclusion guard

We changed to use symbols not likely to be used by non-Perl code that
could conflict, and which have trailing underbars, so they don't look
like a regular Perl #define.

See https://rt.perl.org/Ticket/Display.html?id=131110

There are many more header files which are not guarded.

6 years agoDefine and use symbolic constants for LvFLAGS
Dagfinn Ilmari Mannsåker [Fri, 31 Mar 2017 14:04:15 +0000 (15:04 +0100)]
Define and use symbolic constants for LvFLAGS

6 years agodo not overallocate in zaphod32_hash
Yves Orton [Sun, 26 Mar 2017 17:12:51 +0000 (19:12 +0200)]
do not overallocate in zaphod32_hash

We don't use it, but it should be fixed regardless to sync
with upstream which might.

6 years agoremove unneeded an unwelcome dependency
Yves Orton [Fri, 24 Mar 2017 13:33:36 +0000 (14:33 +0100)]
remove unneeded an unwelcome dependency

I added this when debugging the load average change and forgot to remove it
afterwards, and it upsets Jarkkos test suite.

6 years agoPorting/bench.pl: allow more than one file to be read at a go
Yves Orton [Thu, 23 Mar 2017 21:06:51 +0000 (22:06 +0100)]
Porting/bench.pl: allow more than one file to be read at a go

6 years agoprevent mro.pm from loading DynaLoader
Graham Knop [Sat, 15 Apr 2017 14:23:11 +0000 (16:23 +0200)]
prevent mro.pm from loading DynaLoader

XSLoader::load cares about the package it is called from.  If it is a
different package from what you are trying to load, it falls back to
loading and using DynaLoader.

Move the load call to be in the mro package as it should be, so that it
doesn't trigger needless extra load.

6 years agoPorting: add note on unsetting env
Sawyer X [Fri, 2 Jun 2017 10:58:19 +0000 (12:58 +0200)]
Porting: add note on unsetting env

6 years agoperldelta for delete on key/value slices
Dagfinn Ilmari Mannsåker [Fri, 2 Jun 2017 10:07:40 +0000 (11:07 +0100)]
perldelta for delete on key/value slices

6 years agoAdd support for deleting key/value slices (RT#131328)
Dagfinn Ilmari Mannsåker [Sat, 20 May 2017 13:08:06 +0000 (14:08 +0100)]
Add support for deleting key/value slices (RT#131328)

6 years agorevert the Perl_croak_nocontext() change to PERL_HASH()
Yves Orton [Fri, 2 Jun 2017 02:17:51 +0000 (04:17 +0200)]
revert the Perl_croak_nocontext() change to PERL_HASH()

it only appeared to work, but actually was not being invoked in my testing.

Once it was tested properly it became clear that Perl_croak_nocontext()
is not always available where things are calling PERL_HASH(). Need to investigate
further how to make this work.

6 years agofixup defines for SBOX mode
Yves Orton [Fri, 2 Jun 2017 02:13:47 +0000 (04:13 +0200)]
fixup defines for SBOX mode

6 years agoperldeprecation: Add vec() with above-FF code points
Karl Williamson [Thu, 1 Jun 2017 22:10:48 +0000 (16:10 -0600)]
perldeprecation: Add vec() with above-FF code points

6 years agoUpdate Locale-Codes from CPAN 3.42 to 3.52.
Sullivan Beck [Thu, 1 Jun 2017 21:33:18 +0000 (17:33 -0400)]
Update Locale-Codes from CPAN 3.42 to 3.52.

Committer: re-sorted MANIFEST.

6 years agoPATCH: [perl #131142] Revise 'if' documentation
Ken Cotterill [Thu, 1 Jun 2017 19:09:39 +0000 (13:09 -0600)]
PATCH: [perl #131142] Revise 'if' documentation

This adds text about how to import when you want to 'use MODULE ()'

6 years agoAdd Ken Cotterill to AUTHORS
Karl Williamson [Thu, 1 Jun 2017 19:11:57 +0000 (13:11 -0600)]
Add Ken Cotterill to AUTHORS

6 years agot/op/vec.t: White space only.
Karl Williamson [Thu, 1 Jun 2017 18:37:01 +0000 (12:37 -0600)]
t/op/vec.t: White space only.

Adds an indentation level following the previous commit's adding a
surrounding block

6 years agoDeprecate vec() with above-FF code points.
Karl Williamson [Thu, 1 Jun 2017 18:20:52 +0000 (12:20 -0600)]
Deprecate vec() with above-FF code points.

This will make this consistent with the bitwise operators.

6 years agoset up catchable runloops early enough
Zefram [Sun, 26 Mar 2017 20:53:29 +0000 (21:53 +0100)]
set up catchable runloops early enough

The jmpenv frame to catch Perl exceptions is set up lazily, and this used
to be a bit too lazy.  The flow of control through pp_entereval had a gap
where the eval frame was on the context stack but the catcher hadn't been
set up, and it was possible for an exception to occur in that gap and be
signalled through unwinding, which would thus break.  Specifically this
occurred if the code being evaluated died in a UNITCHECK block, because
doeval_compile() invokes those blocks with no special arrangements for
exceptions, whereas it handles compilation/BEGIN exceptions by means
that don't unwind.

This patch sets up the catcher earlier, before putting the eval frame
on the context stack.  This change is made to entereval, entertry,
and require, the three ops that set up real eval frames.  In each case,
whereas previously the catcher was interposed last thing before handing
off to the following op, the catcher is now set up first thing in the
pp function, with docatch() now recursively invoking the pp function.

Fixes [perl #105930].

6 years agoutf8.h: Add parens around macro param in expansion
Karl Williamson [Thu, 1 Jun 2017 16:44:08 +0000 (10:44 -0600)]
utf8.h: Add parens around macro param in expansion

a6951642ede4abe605dcf0e94b74948e0a60a56b added an assertion to find bugs
in calling macros, and so far, instead, it found a bug in a macro.  A
parameter needs to be enclosed in parens in case it is an expression, so
that precedence works.

6 years agohv_func.h: Fix compilation error
Karl Williamson [Thu, 1 Jun 2017 16:18:02 +0000 (10:18 -0600)]
hv_func.h: Fix compilation error

g++ 6.3 croaks on the new PERL_HASH_WITH_SEED macro.  The parameters
need casts

6 years agosilence warning in gv.t
Yves Orton [Thu, 1 Jun 2017 14:55:01 +0000 (16:55 +0200)]
silence warning in gv.t

Useless use of single ref constructor in void context at op/gv.t line 1191.

Apparently this is intended to test if we crash. But it throws warnings. So
we silence the warnings.

6 years agohv.c: silence compiler warning
Yves Orton [Thu, 1 Jun 2017 14:30:34 +0000 (16:30 +0200)]
hv.c: silence compiler warning

hv.c: In function ‘Perl_hv_undef_flags’:
hv.c:2053:35: warning: ‘orig_ix’ may be used uninitialized in this function [-Wmaybe-uninitialized]
             PL_tmps_stack[orig_ix] = &PL_sv_undef;

The warning is bogus, as we only use orig_ix if "save" is true,
and if "save" is true we will have initialized orig_ix. However
initializing it in the first place avoids any issue

6 years agoav.c: silence compiler warning
Yves Orton [Thu, 1 Jun 2017 14:28:21 +0000 (16:28 +0200)]
av.c: silence compiler warning

av.c: In function ‘Perl_av_undef’:
av.c:577:35: warning: ‘orig_ix’ may be used uninitialized in this function [-Wmaybe-uninitialized]
             PL_tmps_stack[orig_ix] = &PL_sv_undef;

The warning is bogus, as we only use the orig_ix if real is true,
and if real is true we will have set orig_ix. But it doesnt cost
much to initialize it always and shut up the compiler.

6 years agoRT #127742: Hash keys are limited to 2 GB - throw an exception if hash keys are too...
Aaron Crane [Thu, 1 Jun 2017 12:42:22 +0000 (14:42 +0200)]
RT #127742: Hash keys are limited to 2 GB - throw an exception if hash keys are too long

We currently require hash keys to be less than 2**31 bytes long. But (a)
nothing actually tries to enforce that, and (b) if a Perl program tries to
create a hash with such a key (using a 64-bit system), we miscalculate the
size of a memory block, yielding a panic:

$ ./perl -e '+{ "x" x 2**31, undef }'
panic: malloc, size=18446744071562068026 at -e line 1.

Instead, check for this situation, and croak with an appropriate (new)
diagnostic in the unlikely event that it occurs.

This also involves changing the type of an argument to a public API function:
Perl_share_hek() previously took the key's length as an I32, but that makes
it impossible to detect over-long keys, so it must be SSize_t instead.

From Yves:
We also inject the length test into the PERL_HASH() macro, so that where
the macro is used *before* calling into any of the hv functions we can
avoid hashing a very long string only to throw an exception that it is
too long. Might as well fail fast.

6 years agoCaptialise Perl when talking about specific versions in perldelta
Dagfinn Ilmari Mannsåker [Thu, 1 Jun 2017 15:08:50 +0000 (16:08 +0100)]
Captialise Perl when talking about specific versions in perldelta

6 years agoAdd NOT_REACHED to quiet clang -Weverything warnings
Andy Lester [Mon, 27 Feb 2017 03:15:46 +0000 (21:15 -0600)]
Add NOT_REACHED to quiet clang -Weverything warnings

6 years agoRemove deprecated function 'to_utf8_case()'
Karl Williamson [Wed, 10 May 2017 14:29:46 +0000 (08:29 -0600)]
Remove deprecated function 'to_utf8_case()'

This is keeping with the schedule for 5.28.

6 years agoFatalize \N{}
Karl Williamson [Thu, 2 Mar 2017 18:31:36 +0000 (11:31 -0700)]
Fatalize \N{}

This has been deprecated, scheduled to be fatal now.

6 years agot/re/pat_advanced.t: Prepare for fatal \N{}
Karl Williamson [Thu, 2 Mar 2017 18:26:22 +0000 (11:26 -0700)]
t/re/pat_advanced.t: Prepare for fatal \N{}

The next commit will make \N{} fatal, but we still allow a custom
charnames handler to evaluate a name to the empty string, and that still
needs to be tested.  This changes to do that.

6 years agoMove tests to pat_advanced.t
Karl Williamson [Thu, 2 Mar 2017 18:19:39 +0000 (11:19 -0700)]
Move tests to pat_advanced.t

The next commit will change these tests to require the infrastructure
already available in pat_advanced.t

6 years agoregcomp.c: Simplify expression
Karl Williamson [Thu, 2 Mar 2017 04:52:22 +0000 (21:52 -0700)]
regcomp.c: Simplify expression

Here, there is no advantage to assigning a variable within an 'if', and
it is somewhat harder to read, so don't do it.

6 years agore/pat_advanced.t: Convert ok to like
Karl Williamson [Tue, 14 Feb 2017 19:04:28 +0000 (12:04 -0700)]
re/pat_advanced.t: Convert ok to like

'like' gives better diagnostics than 'ok'.  This converts the ones it is
straight forward to do.

6 years agoRestore "improve and update hash algorithm configuration docs in INSTALL"
Yves Orton [Thu, 1 Jun 2017 13:06:44 +0000 (15:06 +0200)]
Restore "improve and update hash algorithm configuration docs in INSTALL"

This reverts commit 9627bf7af087e000c169b623f1a4536976a0f6c1,
and 2b2e489d8a432b3526cb21ef651bb9101ecd5b9d, which were reverts
of commit e7e07d980872d020fd93a43cda96f72c8013af20 and of commit
c25b844905729021ec43dcc6c244d99330d7260a resepctively.

Updated docs to reflect new hash functions, along with some wordsmithing
tweaks to make things read more smoothly (hopefully).

6 years agoRestore "get rid of USE_HASH_SEED_EXPLICIT"
Yves Orton [Thu, 1 Jun 2017 13:04:26 +0000 (15:04 +0200)]
Restore "get rid of USE_HASH_SEED_EXPLICIT"

This reverts commit eba287cb48b881ee252ec418246375010c97a85b,
which was a revert of dd1b95f812312c85390f487887cdd55282fcd6ce.

As far as I know USE_HASH_SEED_EXPLICIT been outright broken for a long
time, and it doesnt make any sense since mandatory randomization anyway,
so simply remove it.

6 years agoRestore "Move utility macros to their own file"
Yves Orton [Thu, 1 Jun 2017 13:02:27 +0000 (15:02 +0200)]
Restore "Move utility macros to their own file"

This reverts commit 3f023586c2fbf826d45cf78795361337eca3daa1,
which was a revert of commit 259e968485f855f70472c8be9267efceca42b0fb.

After this patch hv_func.h is left with only logic relating to
selecting and configuring the hash function we use, not the utility macros
(such as ROTL and equivalent) our hash functions use and share.

6 years agoRestore "Add new hashing and "hash with state" infrastructure"
Yves Orton [Thu, 1 Jun 2017 13:00:13 +0000 (15:00 +0200)]
Restore "Add new hashing and "hash with state" infrastructure"

This reverts commit e6a172f358c0f48c4b744dbd5e9ef6ff0b4ff289,
which was a revert of a3bf60fbb1f05cd2c69d4ff0a2ef99537afdaba7.

Add new hashing and "hash with state" infrastructure

This adds support for three new hash functions: StadtX, Zaphod32 and SBOX,
and reworks some of our hash internals infrastructure to do so.

SBOX is special in that it is designed to be used in conjuction with any
other hash function for hashing short strings very efficiently and very
securely. It features compile time options on how much memory and startup
time are traded off to control the length of keys that SBOX hashes.

This also adds support for caching the hash values of single byte characters
which can be used in conjuction with any other hash, including SBOX, although
SBOX itself is as fast as the lookup cache, so typically you wouldnt use both
at the same time.

This also *removes* support for Jenkins One-At-A-Time. It has served us
well, but it's day is done.

This patch adds three new files: zaphod32_hash.h, stadtx_hash.h,
sbox32_hash.h

6 years agoRestore "Tweak our hash bucket splitting rules"
Yves Orton [Thu, 1 Jun 2017 12:56:12 +0000 (14:56 +0200)]
Restore "Tweak our hash bucket splitting rules"

This reverts commit e4343ef32499562ce956ba3cb9cf4454d5d2ff7f,
which was a revert of 05f97de032fe95cabe8c9f6d6c0a5897b1616194.

Prior to this patch we resized hashes when after inserting a key
the load factor of the hash reached 1 (load factor= keys / buckets).

This patch makes two subtle changes to this logic:

1. We split only after inserting a key into an utilized bucket,
2. and the maximum load factor exceeds 0.667

The intent and effect of this change is to increase our hash tables
efficiency. Reducing the maximum load factor 0.667 means that we should
have much less keys in collision overall, at the cost of some unutilized
space (2/3rds was chosen as it is easier to calculate than 0.7). On the
other hand, only splitting after a collision means in theory that we execute
the "final split" less often. Additionally, insertin a key into an unused
bucket increases the efficiency of the hash, without changing the worst
case.[1] In other words without increasing collisions we use the space
in our hashes more efficiently.

A side effect of this hash is that the size of a hash is more sensitive
to key insert order. A set of keys with some collisions might be one
size if those collisions were encountered early, or another if they were
encountered later. Assuming random distribution of hash values about
50% of hashes should be smaller than they would be without this rule.

The two changes complement each other, as changing the maximum load
factor decreases the chance of a collision, but changing to only split
after a collision means that we won't waste as much of that space we
might.

[1] Since I personally didnt find this obvious at first here is my
explanation:

The old behavior was that we doubled the number of buckets when the
number of keys in the hash matched that of buckets. So on inserting
the Kth key into a K bucket hash, we would double the number of
buckets.  Thus the worse case prior to this patch was a hash
containing K-1 keys which all hash into a single  bucket, and the post
split worst case behavior would be having K items in a single bucket
of a hash with 2*K buckets total.

The new behavior says that we double the size of the hash once inserting
an item into an occupied bucket and after doing so we exceeed the maximum
load factor (leave aside the change in maximum load factor in this patch).
If we insert into an occupied bucket (including the worse case bucket) then
we trigger a key split, and we have exactly the same cases as before.
If we insert into an empty bucket then we now have a worst case of K-1 items
in one bucket, and 1 item in another, in a hash with K buckets, thus the
worst case has not changed.

6 years agoRestore "use a specific define for 64 bit hashing"
Yves Orton [Thu, 1 Jun 2017 12:54:36 +0000 (14:54 +0200)]
Restore "use a specific define for 64 bit hashing"

This reverts commit 63e6b12834233dc9b98f2b7b63611f958aa88cc6,
which was a revert of a4283faf7092ec370914ee3e4e7afeddd0115689.

6 years agoFix #131190 - UTF8 code improperly casting negative integer to U8 in comparison
Yves Orton [Thu, 1 Jun 2017 12:51:44 +0000 (14:51 +0200)]
Fix #131190 - UTF8 code improperly casting negative integer to U8 in comparison

This reverts commit b4972372a75776de3c9e6bd234a398d103677316,
effectively restoring commit ca7eb79a236b41b7722c6800527f95cd76843eed,
and commit 85fde2b7c3f5631fd982f5db735b84dc9224bec0.

6 years agoperlfunc.pod: explain seek in O_APPEND
Dan Collins [Tue, 5 Jul 2016 23:02:12 +0000 (19:02 -0400)]
perlfunc.pod: explain seek in O_APPEND

In all modern systems, seek has no effect in O_APPEND. As explained
by Nick Cleaton at that RT, the comment was written in a time when:

    ...opening a file for append [was] the same as opening for
    write and then seeking to the end.

    This is not the case.  When a file is opened in append mode,
    all writes are appended to the then end of file, irrespective
    of the current file position.

Corrected comment was contributed by him.

6 years agoAvoid unused-parameter warning when compiling with g++.
James E Keenan [Sun, 14 May 2017 13:57:21 +0000 (09:57 -0400)]
Avoid unused-parameter warning when compiling with g++.

6 years ago[perl #131085] Crash with sub-in-stash
Father Chrysostomos [Fri, 7 Apr 2017 21:08:02 +0000 (14:08 -0700)]
[perl #131085] Crash with sub-in-stash

$ perl -e '$::{"A"} = sub {}; \&{"A"}'
Segmentation fault (core dumped)

The code that vivifies a typeglob out of a code ref assumed that the
CV had a name hek, which is always the case when perl itself puts the
code ref there (via ‘sub A{}’), but is not necessarily the case if
someone is insinuating other stuff into the stash.

6 years agoUpdate core with version 0.9918
John Peacock [Tue, 25 Apr 2017 00:06:01 +0000 (20:06 -0400)]
Update core with version 0.9918

6 years agoRelax fatal circumstances of unescaped '{'
Karl Williamson [Wed, 31 May 2017 03:19:20 +0000 (21:19 -0600)]
Relax fatal circumstances of unescaped '{'

After the 5.26.0 code freeze, it came out that an application that many
others depend on, GNU Autoconf, has an unescaped '{' in it.  Commit
7335cb814c19345052a23bc4462c701ce734e6c5 created a kludge that was
minimal, and designed to get just that one application to work.

I originally proposed a less kludgy patch that was applicable across a
larger set of applications.  The proposed patch didn't fatalize uses
of unesacped '{' where we don't anticipate using it for something other
than its literal self.  That approach worked for Autoconf, but also far
more instances, but was more complicated, and was rejected as being too
risky during code freeze.

Now this commit implements my original suggestion.  I am putting it in
now, to let it soak in blead, in case something else surfaces besides
Autoconf, that we need to work around.  By having experience with the
patch live, we can be more confident about using it, if necessary, in a
dot release.

6 years agot/re/reg_mesg.t: Add override of warning default on/off
Karl Williamson [Wed, 31 May 2017 19:08:33 +0000 (13:08 -0600)]
t/re/reg_mesg.t: Add override of warning default on/off

This .t needs an overhaul to more cleanly accommodate the extra tasks it
has been given over the years.  But until then, this is a minimal
enhancement that will be useful in the commit after this one.

This adds the ability to specify that a particular pattern being tested
should generate a message which is raised by default vs one that isn't.
The messages are currently grouped in categories whose default is
determined by the category itself.  This commit avoids having to create
a new category when a message comes along that doesn't quite fit into
the existing ones.

6 years agoregcomp.c: Don't set variable within an 'if'
Karl Williamson [Wed, 31 May 2017 19:44:20 +0000 (13:44 -0600)]
regcomp.c: Don't set variable within an 'if'

Sometimes it is convenient/and or necessary to do an assignment within a
clause of an 'if', but it adds a little cognitive load.  In this case,
it's entirely unnecessary.  This patch changes to do the assignment
before the 'if'.

6 years agoperlguts: Add some C<>
Karl Williamson [Wed, 24 May 2017 02:54:06 +0000 (20:54 -0600)]
perlguts: Add some C<>

6 years agocharnames: Clarify comment
Karl Williamson [Wed, 24 May 2017 02:53:11 +0000 (20:53 -0600)]
charnames: Clarify comment

6 years agocharnames: Remove obsolete pod about NBSP
Karl Williamson [Wed, 24 May 2017 02:51:56 +0000 (20:51 -0600)]
charnames: Remove obsolete pod about NBSP

This is illegal since 5.26, and the text should have been removed then,
but was overlooked.

6 years agoperlmodinstall: Make a link for http text
Karl Williamson [Wed, 24 May 2017 02:50:44 +0000 (20:50 -0600)]
perlmodinstall: Make a link for http text

6 years agoutf8.h: Add assertions for macros that take chars
Karl Williamson [Wed, 26 Apr 2017 16:29:58 +0000 (10:29 -0600)]
utf8.h: Add assertions for macros that take chars

This is inspired by [perl #131190].  The UTF-8 macros whose parameters
are characters now have assertions that verify they are not being called
with something that won't fit in a char.  These assertions should be
getting optimized out if the input type is a char or U8.

6 years agoChange formal parameter for newSVpvn
Karl Williamson [Thu, 20 Apr 2017 14:33:42 +0000 (08:33 -0600)]
Change formal parameter for newSVpvn

This fixes a discrepancy in perlapi.  See
http://nntp.perl.org/group/perl.perl5.porters/243384

6 years agoAUTHORS: Update Jim Shneider's email
Karl Williamson [Tue, 11 Apr 2017 17:37:23 +0000 (11:37 -0600)]
AUTHORS: Update Jim Shneider's email

6 years agot/op/fork.t: Don't output shell warning
Karl Williamson [Tue, 11 Apr 2017 20:11:40 +0000 (14:11 -0600)]
t/op/fork.t: Don't output shell warning

If the shell doesn't support 'ulimit -u', it can cause unexpected
warnings that can cause the tests to fail.  This happens on s/390.

6 years agoAPItest/numeric.xs: Fix uninit error
Karl Williamson [Tue, 11 Apr 2017 17:11:24 +0000 (11:11 -0600)]
APItest/numeric.xs: Fix uninit error

valgrind shows that a variable could be used unininitialized.

6 years agot/harness: Run APItests in parallel
Karl Williamson [Wed, 22 Mar 2017 03:52:33 +0000 (21:52 -0600)]
t/harness: Run APItests in parallel

This commit changes these tests to be run like the tests in t/lib, in
parallel with each other, when available.  This is the longest running
directory, and prior to this commit, on many-core systems it can be the
final thing chugging along, a test at-a-time, while the other cores are
idle.

6 years agot/harness: Remove useless sort
Karl Williamson [Wed, 22 Mar 2017 03:41:34 +0000 (21:41 -0600)]
t/harness: Remove useless sort

Instead move its effect to the sort that overrides the first one.  This
is because the tests are executed in the order of the rules to
TAP::Harness, not in the order of the test list.

6 years agoSlightly change -Dr output of regex ANYOF nodes
Karl Williamson [Mon, 30 Jan 2017 21:52:46 +0000 (14:52 -0700)]
Slightly change -Dr output of regex ANYOF nodes

This changes to precede each literal '[' in a [...] class with a
backslash to better make is standout as a literal

6 years agoWhen and how to use Devel::PatchPerl to repair older builds.
James E Keenan [Mon, 27 Feb 2017 17:24:25 +0000 (12:24 -0500)]
When and how to use Devel::PatchPerl to repair older builds.

Following recommendation by Matthew Horsfall.

6 years agoAdd Module-CoreList maintainer tests
Chris 'BinGOs' Williams [Thu, 1 Jun 2017 12:28:00 +0000 (13:28 +0100)]
Add Module-CoreList maintainer tests

6 years agoUpgrade to threads 2.16
jdhedden [Sun, 7 May 2017 22:33:39 +0000 (18:33 -0400)]
Upgrade to threads 2.16

6 years agoUpgrade to threads::shared 1.57
jdhedden [Sun, 7 May 2017 22:48:59 +0000 (18:48 -0400)]
Upgrade to threads::shared 1.57

6 years agoext/GDBM_File: Add L<> around pod link
Karl Williamson [Wed, 5 Apr 2017 17:36:11 +0000 (11:36 -0600)]
ext/GDBM_File: Add L<> around pod link

6 years agoXS-APItest: Rename some tests files
Karl Williamson [Wed, 22 Mar 2017 03:37:28 +0000 (21:37 -0600)]
XS-APItest: Rename some tests files

The names of these long-running test files are changed to uniform style
to indicate that they run long.

6 years agoSilence many "statement not reached" on Solaris
Karl Williamson [Mon, 20 Mar 2017 23:17:39 +0000 (17:17 -0600)]
Silence many "statement not reached" on Solaris

It turns out that the NOT_REACHED macro that is used to make sure a
statement really isn't reachable, causes the Solaris compiler to emit
such warnings.  It expands to ASSUME(0), and Solaris will flag that.
This commit just changes NOT_REACHED to expand to nothing on Solaris.

6 years agomktables: Fix up version compare
Karl Williamson [Sat, 11 Mar 2017 18:50:58 +0000 (11:50 -0700)]
mktables: Fix up version compare

This is a feature that is used to compare 2 different Unicode versions
for changes to existing code points, ignoring code points that aren't in
the earlier version.  It does this by removing the newly-added code
points coming from the later version.  One can then diff the generated
directory structure against an existing one that was built under the old
rules to see what changed.

Prior to this commit, it assumed all version numbers were a single digit
for the major number.  This will no longer work for Unicode 10, about to
be released.

As part of the process, mktables adds blocks that didn't exist in the
earlier version back to the unallocated pool.  This gives better diff
results.  This commit does a better job of finding such blocks.

6 years agoregcomp.c: Change lookup for dumping pattern
Karl Williamson [Mon, 30 Jan 2017 21:01:29 +0000 (14:01 -0700)]
regcomp.c: Change lookup for dumping pattern

Instead of using a bunch of branches, use strchr() to see if a
character is a member of a class.  This is a common paradigm in the
parsers.

6 years agoReword description of 'bytes_from_utf8()'
Karl Williamson [Fri, 12 May 2017 04:25:25 +0000 (22:25 -0600)]
Reword description of 'bytes_from_utf8()'

This should make it clearer as to what's going on.

6 years agoAPItest/t/utf8_setup.pl: Add #define equivalent
Karl Williamson [Wed, 17 May 2017 17:27:03 +0000 (11:27 -0600)]
APItest/t/utf8_setup.pl: Add #define equivalent

I don't know of an easy way to automatically import hdr file constants
into Perl code (and if there were one, there are plenty of existing
modules that don't take advantage of it), and so they get copied and
pasted into Perl, and changed enough to match Perl syntax.  When the
constants change, the Perl code must be manually updated.  Here, a new
constant was added, and now the Perl is being updated to match.

6 years agoperluniintro: Update advice for LC_COLLATE
Karl Williamson [Wed, 17 May 2017 17:21:57 +0000 (11:21 -0600)]
perluniintro: Update advice for LC_COLLATE

This was changed to work better in 5.26, but this pod didn't get
updated.

6 years agoMerge branch 'blead' of ssh://perl5.git.perl.org/perl into blead
Sawyer X [Thu, 1 Jun 2017 12:30:41 +0000 (14:30 +0200)]
Merge branch 'blead' of ssh://perl5.git.perl.org/perl into blead

6 years agoUpdate Module::CoreList
Sawyer X [Thu, 1 Jun 2017 11:57:27 +0000 (13:57 +0200)]
Update Module::CoreList

6 years agoAdd dist/threads/t/unique.t to MANIFEST.
James E Keenan [Thu, 1 Jun 2017 11:57:46 +0000 (07:57 -0400)]
Add dist/threads/t/unique.t to MANIFEST.

Should have been done in commit cfdc35fc22e32a4383f59856f093e3f386a646b7.

6 years agoBinGOs will do 5.27.7
Sawyer X [Thu, 1 Jun 2017 11:51:54 +0000 (13:51 +0200)]
BinGOs will do 5.27.7

6 years agoPorting: correct assigned releasers
Sawyer X [Thu, 1 Jun 2017 11:46:07 +0000 (13:46 +0200)]
Porting: correct assigned releasers

6 years agoPorting: Add release schedule
Sawyer X [Thu, 1 Jun 2017 11:41:36 +0000 (13:41 +0200)]
Porting: Add release schedule

6 years ago5.28.0 is the next major release
Matthew Horsfall [Thu, 1 Jun 2017 11:37:02 +0000 (07:37 -0400)]
5.28.0 is the next major release

6 years agoA corelist not a snorelist
Chris 'BinGOs' Williams [Thu, 1 Jun 2017 11:36:51 +0000 (12:36 +0100)]
A corelist not a snorelist

6 years agoEliminate remaining uses of PL_statbuf
Dagfinn Ilmari Mannsåker [Tue, 17 Jan 2017 17:37:56 +0000 (17:37 +0000)]
Eliminate remaining uses of PL_statbuf

Give Perl_nextargv its own statbuf and pass a pointer to it into
Perl_do_open_raw and thence S_openn_cleanup when needed.

Also reduce the scope of the existing statbuf in Perl_nextargv to make
it clear it's distinct from the one populated by do_open_raw.

Fix perldelta entry for PL_statbuf removal

6 years agoImprove error message for bogus -MO=… arguments
Dagfinn Ilmari Mannsåker [Sun, 26 Mar 2017 13:26:22 +0000 (15:26 +0200)]
Improve error message for bogus -MO=… arguments

Commit 7a9b44b9 expanded the scope of the string eval that loads the
B::* backend module, but didn't move the $@ check and croak to outside
it.  Restore it and further improve the error message.

Before:

    $ perl -MO=Concise=-debug -e1
    syntax error at (eval 2) line 18, near "="
    BEGIN failed--compilation aborted.

After:

    $ ./perl -Ilib -MO=Concise=-debug -e1
    Loading compiler backend 'B::Concise=-debug' failed: syntax error at (eval 2) line 18, near "="
     at -e line 0.
    BEGIN failed--compilation aborted.

6 years agoNote removal of deprecated attributes in perldelta and perlexperiment
Dagfinn Ilmari Mannsåker [Wed, 31 May 2017 16:05:22 +0000 (17:05 +0100)]
Note removal of deprecated attributes in perldelta and perlexperiment

6 years agoRemove deprecated no-op :locked attribute
Dagfinn Ilmari Mannsåker [Mon, 18 Jan 2016 12:52:29 +0000 (12:52 +0000)]
Remove deprecated no-op :locked attribute

It's been a no-op since 5.10 and deprecated since 5.12.

6 years agoRemove deprecated no-op :unique attribute
Dagfinn Ilmari Mannsåker [Mon, 18 Jan 2016 12:42:55 +0000 (12:42 +0000)]
Remove deprecated no-op :unique attribute

It's been deprecated and a no-op since 5.10.

Move :unique test into it own file so it can be skipped separately

Merely parsing an unknown attribute fails, so the skip has to happen
at BEGIN time.

6 years agoRemove deprecated comma-less format variable lists
Dagfinn Ilmari Mannsåker [Sat, 12 Nov 2016 16:08:18 +0000 (17:08 +0100)]
Remove deprecated comma-less format variable lists

This has been issuing a deprecation warning since perl 5.000.

6 years agoDisable readdir_r and readdir64_r on glibc >= 2.24
H.Merijn Brand [Thu, 11 May 2017 14:47:45 +0000 (16:47 +0200)]
Disable readdir_r and readdir64_r on glibc >= 2.24

DESCRIPTION
       This function is deprecated; use readdir(3) instead.

       The  readdir_r()  function was invented as a reentrant version of read-
       dir(3).  It reads the next directory entry from  the  directory  stream
       dirp,  and  returns  it  in  the  caller-allocated buffer pointed to by
       entry.  For details of the dirent structure, see readdir(3).

       A pointer to the returned buffer is placed in *result; if  the  end  of
       the  directory stream was encountered, then NULL is instead returned in
       *result.

       It is recommended that applications use  readdir(3)  instead  of  read-
       dir_r().   Furthermore,  since  version  2.24,  glibc  deprecates read-
       dir_r().  The reasons are as follows:

       *  On systems where NAME_MAX is undefined, calling readdir_r()  may  be
          unsafe  because  the  interface does not allow the caller to specify
          the length of the buffer used for the returned directory entry.

       *  On some systems, readdir_r() can't read directory entries with  very
          long  names.   When the glibc implementation encounters such a name,
          readdir_r() fails with the error ENAMETOOLONG after the final direc-
          tory  entry  has  been read.  On some other systems, readdir_r() may
          return a success status, but the returned d_name field  may  not  be
          null terminated or may be truncated.

       *  In  the  current POSIX.1 specification (POSIX.1-2008), readdir(3) is
          not required to be thread-safe.  However, in modern  implementations
          (including the glibc implementation), concurrent calls to readdir(3)
          that specify different directory streams  are  thread-safe.   There-
          fore,  the  use  of  readdir_r()  is generally unnecessary in multi-
          threaded programs.  In cases where multiple threads must  read  from
          the  same  directory stream, using readdir(3) with external synchro-
          nization is still preferable to the use of readdir_r(), for the rea-
          sons given in the points above.

       *  It  is  expected  that  a  future version of POSIX.1 will make read-
          dir_r() obsolete, and require that readdir(3)  be  thread-safe  when
          concurrently employed on different directory streams.

6 years agoadd X<s> to s/// in perlop (RT #131371)
Lukas Mai [Fri, 26 May 2017 18:15:12 +0000 (20:15 +0200)]
add X<s> to s/// in perlop (RT #131371)

This should make 'perldoc -f s' work.

6 years agofixup typo (squash candidate) in globbing code comments
Yves Orton [Mon, 8 May 2017 13:01:08 +0000 (15:01 +0200)]
fixup typo (squash candidate) in globbing code comments

This fixes up a typo from 444c4cd5e784ec836ff4a81a582bcb0df9f1e277,
if possible before merging to blead squash this commit with that.

6 years ago[perl #131211] fixup File::Glob degenerate matching
Yves Orton [Tue, 25 Apr 2017 13:17:06 +0000 (15:17 +0200)]
[perl #131211] fixup File::Glob degenerate matching

The old code would go quadratic with recursion and backtracking
when doing patterns like "a*a*a*a*a*a*a*x" on a file like
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa".

This patch changes the code to not recurse, and to not backtrack,
as per this article from Russ Cox: https://research.swtch.com/glob

It also adds a micro-optimisation for M_ONE and M_SET under the new code.

Thanks to Avar and Russ Cox for helping with this patch, along with
Jilles Tjoelker and the rest of the FreeBSD community.

6 years agoperldelta: New perldelta
Sawyer X [Wed, 31 May 2017 21:40:02 +0000 (23:40 +0200)]
perldelta: New perldelta

6 years agoepigraphs: linkify releasae
Sawyer X [Wed, 31 May 2017 21:38:32 +0000 (23:38 +0200)]
epigraphs: linkify releasae

6 years agotick release
Sawyer X [Wed, 31 May 2017 21:34:37 +0000 (23:34 +0200)]
tick release

6 years agoepigraph: Updating, pending link
Sawyer X [Wed, 31 May 2017 21:31:22 +0000 (23:31 +0200)]
epigraph: Updating, pending link

6 years agoadd new release to perlhist v5.27.0
Sawyer X [Wed, 31 May 2017 18:54:05 +0000 (20:54 +0200)]
add new release to perlhist

6 years agoperldelta.pod: Finalize perldelta
Sawyer X [Wed, 31 May 2017 18:41:36 +0000 (20:41 +0200)]
perldelta.pod: Finalize perldelta

6 years agoUpdate Module::CoreList for 5.27.0
Sawyer X [Wed, 31 May 2017 18:23:00 +0000 (20:23 +0200)]
Update Module::CoreList for 5.27.0

6 years agoAdd changes
Sawyer X [Wed, 31 May 2017 14:22:59 +0000 (16:22 +0200)]
Add changes

6 years agoCoreList: bump version for v5.27.0 release
Ricardo Signes [Wed, 31 May 2017 14:02:08 +0000 (10:02 -0400)]
CoreList: bump version for v5.27.0 release