Refactor perlmodlib.PL to use regen_lib.pl and avoid FindBin.

Instead of using FindBin, pass a directory to use on the command line.
Use regen_lib for handling the output file.
die if any file opened for reading has errors on closing.
Run with the cwd as the top level of the distribution, instead of pod/
[perl #118627] Don’t do COW when creating ${"_<-e"}[0]

The lexer does not expect PL_linestr (an SV holding the current line
of Perl code being parsed) to do copy-on-write.  It expects to be able
to manipulate that SV to its hearts content with impunity.  The one
piece of code that can cause it to do that is S_update_debugger_info,
when called with a SV for the first argument.  The only time it is
called that way is for line 0 of the main script, containing state-
ments generated from command line arguments (e.g., ‘use strict’ from
‘-Mstrict’), and it is called with PL_linestr as its argument.

If ${"_<-e"}[0] ends up sharing the buffer with PL_linestr, bad things
will happen, as the lexer is going to continue to modify that buffer.

Usually we get this:

$ ./perl -It/lib -d:switchd_empty -e'print @{"_<-e"}' |less
^@se Devel::switchd_empty;
print @{"_<-e"}

So force S_update_debugger_info to do a non-COW copy.
Consistent spaces after dots in perlvar
switchd.t: correct bug number
Eliminate the Makefile targets test_notty.valgrind and test_prep.valgrind.

The target test_notty.valgrind depends on the target test_prep.valgrind.
The target test_prep.valgrind depends on the target perl.valgrind.
The target perl.valgrind does not exist!

perl.valgrind never existed. The targets which depend on it were added as
part of commit 7a834142adbc51cc (Aug 2003), which added code and
documentation for running the test suite with valgrind. However, that commit
did not add a perl.valgrind target, despite adding dependencies on it. Hence
the various targets which depended on it could never have worked. Of the
4 similar targets, only test.valgrind works because unlike the other 3,
it depends on test_prep, not test_prep.valgrind
Inline the Makefile target perl.valgrind.config into its only remaining user.

Add the 3 recently deleted Makefile targets to the list in perldelta.pod, and
reflow the list.
Specify the versions of ExtUtils::MiniPerl and ExtUtils::Embed needed.

Without this, regen/miniperlmain.pl could end up finding versions which are
out of date, and silently generate an incorrect miniperlmain.c
Fix SEGVs and test failures for -DPERL_GLOBAL_STRUCT_PRIVATE

With PERL_GLOBAL_STRUCT_PRIVATE "global" variables are in a structure in
malloc()ed memory, not in global static variables or a global static
structure. Hence no global variables are implicitly initialised to zero.

* PL_curinterp and PL_op_sequence need initialising to NULL
* The global structure is free()d before handlers registered with atexit()
  run, so be defensive about this.
* Some C code checks SvOK(PL_sv_placeholder) so ensure that its SvFLAGS()
  are 0.
* Zero PL_hash_seed
For -DPERL_GLOBAL_STRUCT, eliminate local variable plvarsp in main().
perldiag: note the exceptions for "once" warnings
Add a const qualifier for the arg to the S_CvGV inline function in cv.h.

In addition to correctly describing the behavior of S_CvGV, this avoids
warnings in op.c:Perl_report_redefined_cv, where the old (CV *) cast
removed the 'const' qualifier.  Observed on OpenBSD 5.2 with gcc-4.2.1.
POD inside of a function call is inadvisable.

Documentation suggestions based largely on suggestions by
Aaron J Trevena and Brad Gilbert.

For: RT #68706
t/base/lex.t: Test pyoq with comment before delim

perlop says:

There can be whitespace between the operator and the quoting
characters, except when C<#> is being used as the quoting character.
C<q#foo#> is parsed as the string C<foo>, while C<q #foo#> is the
operator C<q> followed by a comment.  Its argument will be taken
from the next line.

But I do not find tests for this anywhere.  Here are some.
Allow => to quote built-in keywords across lines

If I have a sub I can use its name as a bareword as long as I suffix
it with =>, even if the => is on the next line:

$ ./perl -Ilib -e 'sub tim; warn tim' -e '=>'
tim at -e line 1.

If I want to use a built-in keyword’s name as a bareword, I can put =>
after it:

$ ./perl -Ilib -e 'warn time =>'
time at -e line 1.

But if I combine the two (keyword + newline), it does not work:

$ ./perl -Ilib -e 'warn time' -e ' =>'
1373611283 at -e line 1.

unless I override the keyword:

$ ./perl -Ilib -Msubs=time -e 'warn time' -e ' =>'
time at -e line 1.

=> after a bareword is checked for in two places in toke.c.  The first
comes before a comment saying ‘NO SKIPSPACE BEFORE HERE!’; it only
skips spaces and finds a => on the same line.  The second comes later;
it skips vertical space and comments, too.

But the second check is in a code path that is not reached by keywords
that are not overridden (as is the ‘NO SKIPSPACE’ comment).

This commit adds an extra check for built-in keywords after we have
determined that the keyword is not overridden.  In that case, there is
no reason we cannot use skipspace, as we no longer have to worry about
what PL_oldbufptr etc. point to.

This commit leaves __DATA__ and __END__ alone, since they
are special, problematic and controversial.  (See, e.g.,
<https://rt.perl.org/rt3/Ticket/Display.html?id=78348#txn-1234355>.)
perldiag: reflow an entry for better splain output
[perl #113932] Make UNIVERSAL::can("STDOUT"...) work

For consistency with the way method lookup works, UNIVERSAL::can(...)
should treat a bareword representing a filehandle as a lookup in the
IO::File package (or whichever package implements that filehandle
object).
[perl #118857] Test punct vars’ exemption from ‘once’ warnings
[perl #118525] Return B::HEK for B::CV::GV of lexical subs

A lexsub has a hek instead of a gv. Provide a ref to a PV for the name
in the new B::HEK class.
This crashed previously accessing the not existing SvFLAGS of the hek.
Revert "Allow => to quote built-in keywords across lines"

This reverts commit 5969c5766a5d3f6b42a5140548d7c3d6812fec8b.

It appears to be failing with non-mad builds.
Revert "[perl #118525] Return B::HEK for B::CV::GV of lexical subs"

This reverts commit 8748370e90a24f3901d476f43ed77f1ac3d861f4.

There appears to be a typemap problem.  I accidentally pushed the patch
too soon.  Sorry for the noise.