perlexperiment.pod clarifications

Removed in Perl is misleading. Those modules just moved to CPAN and are not deprecated.
threads are now ithreads since multiplicity.
[perl #114222] Make ‘use’ parse arguments in term context

(lexing context, that is)

use constant { () }

was a syntax error, because the lexer was guessing when { should be
a statement or hash.

It should not be doing that where a term is expected.

It was actually getting itself confused, and trying to parse the
argument list as a statement.

Setting PL_expect after force_next is ineffectual, as force_next
records the current value of PL_expect, arranging to have it
restored.

OPERATOR(USE) was setting PL_expect, but too late.  So no we set
PL_expect explicitly in S_tokenize_use, before any forced tokens,
and use TOKEN(USE), which does not set PL_expect (as setting it
there has no effect).
avoid decoding on input in the new tests added in 613c63b4

This fixes these tests when run in a unicode environment, eg:

  PERL_UNICODE= LC_ALL=en_AU.utf8 ./perl op/magic.t

This does fix tha code page related issue on Win32.
Store version information as a delta in Module::CoreList

This reduces the size of the CoreList.pm file by storing the difference
between the versions of perl rather than a full list for each version.

In order to achieve this without changing the interface each key in the
%version hash is tied to a special tied hash that inflates the stored
difference data to the full list of modules and versions.

As part of the upgrade I ran a comparison with the
%version hash in the current Module::CoreList -- there are no
differences.
Module::CoreList: Automatically add aliases for releases

When the release in numeric and conventional written form differ add an
alias for the formatted variant automatically.
Remove CR characters from raw input in op/magic.t on Windows

The :raw input added by e2e1d5ce8b broke tests on Windows by introducing
unexpeted CR characters.

Two tests (154 and 157) currently still fail on Windows if the (DOS)
command prompt is using a different code page to perl's native (Windows)
character set.
sv.c:varname: Fix bad assertion added by c6fb3f6e

#!perl -w
my $x;
format =
@
"$x";
.
write;
__END__
Assertion failed: (!cv || SvTYPE(cv) == SVt_PVCV), function Perl_varname, file sv.c, line 13924.
Abort trap
Close over stale vars in active subs

\$x and sub { $x }->() should never produce different values.  But
this used to be possible because sub cloning (which happens with
sub{...}) was written to avoid closing over variables that are not
active.  Not closing over inactive variables makes sense in cases like
this (because the variable doesn’t really exist yet):

sub {
    my $x;
    sub foo {
        $x
    }
}
foo;

but the logic breaks down in cases like this (which was printing 3
only on the first print):

sub foo {
    my $x;
    sub bar {
        $x = 3;
        print $x, "\n";
        sub { print $x, "\n" }->()
    }
}
bar();

If bar can see a scalar named $x (even if it is questionable),
sub { $x }->() should jolly well see the same scalar as the immedi-
ately enclosing sub.

The only case where a run-time cloning of a CV should refuse to close
over the same scalar that the outer sub sees is when the outer sub is
not running.  That only happens with formats:

sub f {
    my $x;
    format =
@
$x
.
}
write STDOUT;

As of this commit, it does only happen with formats.

The actual cases of subs refusing to close over stale variables in
active parents have changed twice since 5.10.0.  See the comments in
the tests.
pad.c:cv_clone: add assertions

The outer sub should always be active and have a pad if it is
a sub that is being cloned.  Only formats can have an inactive or
padless outside.  Add assertions to that effect.
pad.c:cv_clone: Rmv irrelevent part of comment
[perl #78550] Fix bad assertion in toke.c:start_subparse

The outer ‘sub’ might actually be a format
Make PL_(top|body|form)target PVIVs

These are only used for storing a string and an IV.

Making them into full-blown SVt_PVFMs is overkill.

FmLINES was only being used on these three scalars.  So make it use
the SvIVX field.  struct xpvfm no longer needs an xfm_lines member,
because SVt_PVFMs no longer use it.

This also causes a TODO test in taint.t to start passing, but I do
not fully understand why.  But at least that’s progress. :-)
Disallow setting SvPV on formats

Setting a the PV on a format is meaningless, as of the previ-
ous commit.

This frees up SvCUR for other uses.
Add a depth field to formats

Instead of lengthening the struct, we can reuse SvCUR, which is cur-
rently unused.
Recursive formats and closures in formats.

Formats called recursively were using the same set of lexicals, so the
inner call would stomp on the outer calls vars, usually clearing them
when exiting.

Previous commits prepared a CvDEPTH field for formats.  This commit
sets it in P(USH|OP)FORMAT and pushes a new pad in enterwrite.

This also allows closures to work properly in formats.  Formerly they
caused assertion failures in cv_clone.  Now cv_clone’s assumptions
about CvDEPTH on CvOUTSIDE and find_runcv are met when subs are embed-
ded in formats.
Fix Devel::Peek’s tests for format changes
Don’t let active formats be freed

This crashes:

format FOO =
@<
undef *FOO
.
$~ = FOO;
write

The context stack needs to hold a reference count for formats, just as
it does for subs.
parser.t: Move tests above ‘Add tests here’
Make glob.t more resilient

It was not tolerating editor temp files with spaces in their
names.  It was testing the output of <op/*> by comparing it with
split /\s/, `echo op/*` on non-Windows non-VMS systems (Unix).
`ls op/* | cat` produces more machine-friendly output, so use that.
Don’t crash when undefining handle of active format

format FOO =
@
undef *STDOUT
.
$~ = FOO;
write

Commit 7ef822cddfe9 began the work by putting in a null check and a
goto (to bypass the top format), but the goto wentto some code that
lacked the null check.  (It did actually fix the case of a IO with no
ofp, but not the case of a GV with no IO.)  Interestingly, it added a
bad_ofp label, but did not add the code to goto it (an oversight?).

The unused bad_ofp label was commented out in commit 9cbac4c72b52.

There was already a check before 7ef822cddfe9 to see whether there was
an ofp, but only after the format scope has been popped.

This commit extends that check by making sure there is an io first.

It removes the commented-out bad_ofp label.