As of commit 282b29ee485, pp_requires passes an SV to S_doopen_pm,
instead of char*/length pair.

That commit also used sv_mortalcopy() to copy the sv when trying out a
.pmc extension:
+ SV *const pmcsv = sv_mortalcopy(name);

When the path is absolute, the sv passed to S_doopen_pm is the very sv
that was passed to require. If it was returned from a (non-lvalue)
sub-routine, it will be marked TEMP, so the buffer gets stolen.

After the .pmc file is discovered to be nonexistent, S_doopen_pm then
uses its original sv to open the .pm file. But the buffer has been
stolen, so it’s trying to open undef, which fais.

In the mean time, pp_require still has a pointer to the stolen buffer,
which now has a .pmc extenion, it blithely reports that the .pmc file
cannot be found, not realising that its string has changed out from
under it. (Actually, if the file name were just the right length, it
could be reallocated and we could end up with a crash.)

I also fixed a bug in the original. I'm always getting C<eof> vs C<eof()>
swapped in my brain, which is what had happened here. The old code didn't
do what it said it did because it contrary to the comments didn't reset at
each eof -- because it used the C<eof()> form which is all of ARGV rather
than bare C<eof> for the last file read, and thus each per-file component
of ARGV.

I am concerned about the two paragraphs previous to that, because they
use eof() and I am not perfectly clear that they should. But I left
them as is.

Jesse asked for "a lot of eyes", so if folks could please look at this
patch and see whether it looks ok, I'd appreciate it. I did test it
under blead, both with and without the prefixed m on the m?? matches,
which is how I discovered it was buggy with the C<eof()> not C<eof>.

This patch causes inverted [bracketed] character classes to not handle
multi-character folds. The reason is that these can lead to very
counter-intuitive results (see bug discussion).

In an inverted character class, only single-char folds are now
generated. However the fold for \xDF=>ss is hard-coded in,
and it was too much trouble sending flags to the sub-sub routine that
does this, so another check is done at the point of storing the list of
multi-char folds. Since \xDF doesn't have a single char fold, this
works.

The interface is subject to change, so these are marked experimental
and their names begin with underscore. The old versions are turned
into macros calling the new versions with the correct extra parameter.

Code within the function doesn't assume that the parameter is non-null,
and in fact the specials are retrieved by swash_init(). Having the
parameter null just means that no specials will be retrieved in the
current call.

• Remove C<...> around get-magic and set-magic. Those are prose
descriptions of what is known internally as mg_get, SvGETMAGIC,
SVs_GMG, etc.
• Re-instate the message that 804b5feed removed, but in the form in
which it appears in perldiag.
• Remove the thing about version class methods. It’s a bug fix, not a
problem (whether known or unknown :-), and not a significant one.
• Spelling mistake

We already skip this test file on many platforms which don't
have interruptible IO system calls. Extend this to unconditionally
skip if it's an even (production) release version, so that we don't get
false positives for other platforms we didn't know about.

Update the documentation for rand() to note that it's not
cryptographically secure due to concerns that end-users are unaware of
this and use it in situations where security depends on the strength of
the randomness generated.

I'd have been happier getting this patch in earlier in the cycle.
We'd hoped to replace the RNG, but that didn't happen in time, so this
doc update is the "better, still not good" fallback.

The threads version for blead was bumped for the 5.13.11 release,
but not all version numbers were bumped, so the '1.83' in 5.14.0
will be marginally different (1 line of text) than in the 5.13.11 release.

The recent change to hints/linux.sh,40f026236b9959b7ad3260fedc6c66cd30bb7abc
set the plibpth variable.
It was supposed to set all entries on a single line, but it didn't.
Do it now, and also remove trailing /'s.

(The collapsing is a more robust version of the previous commit,
since reverted, that davem wrote independently).

As part of their switch to a multi-arch library layout,
Ubuntu 11.04 (and later, presumably) doesn't keep most libraries
(such as -lm) in /lib or /usr/lib. So we have to ask gcc to tell us
where to look. We don't want gcc's own libraries, however, so we
filter those out.

This could be conditional on Ubuntu, but other distributions have
announced their intent follow suit, and this scheme seems to work even
on rather old gcc's. This unconditionally uses gcc because even if the
user is using another compiler, we still need to find the math library
and friends, and I don't know how other compilers will cope with that
situation. Still, as an escape hatch, allow Configure command line
overrides to plibpth to bypass this check.

Commit 088225f was not sufficient to fix the regression. It still
exists for packages whose names end with a single colon.

I discovered this when trying to determine why RDF::Trine was crashing
with 5.14-to-be.

In trying to write tests for it, I ended up triggering the same crash
that RDF::Trine is having, but in a different way.

In the end, it was easier to fix about three or four bugs (depending
on how you count them), rather than try to fix only the regression
that #88132 deals with (isa caches not updating when packages ending
with colons are aliased), as they are all intertwined.

The changes are as follows:

Concerning the if (!(flags & ~GV_NOADD_MASK)...) statement in
gv_stashpvn: Normally, gv_fetchpvn_flags (which it calls and whose
retval is assigned to tmpgv) returns NULL if it has not been told
to add anything and if the gv requested looks like a stash gv (ends
with ::). If the number of colons is odd (foo:::), that code path is
bypassed, so gv_stashpvn returns a GV without a hash. So gv_stashpvn
tries to used that NULL hash and crashes. It should instead return
NULL, to be consistent with the two-colon case.

Blindly assigning a name to a stash does not work if the stash has
multiple effective names. A call to mro_package_moved is required as
well. So what gv_stashpvn was doing was insufficient.

The parts of the mro code that check for globs or stash elems that
contain stashes by looking for :: at the end of the name now take into
account that the name might consist of a single : instead.

catfile() with an empty string as a first argument does *not*
produce an absolute path on VMS (and probably only does so by
accident elsewhere). For purposes of the test, it seems that
any absolute path would do, so this could probably be done
portably, but on the eve of 5.14 let's make a separate code
path for VMS and leave everyone else as is for now.

It's sufficient for purposes of enabling prerequisite warnings to
set a localized $ENV{PERL_CORE} to undef rather than making a local
copy of the entire %ENV hash. This makes the test pass on VMS,
where copying %ENV in toto is not supported.

This fixes a smoke failure, so borrow it from upstream, where it's
already released as part of MM 6.57_10. 6.58 will contain an
additional tweak that works with Perl 5.6, but no need to worry
about that here.