16acebf refactored parts of t/op/pwent.t and enabled warnings. The refactoring was not the cause - the previous t/op/pwent.t code would warn if run with -w. On OS X (and presumably any other platform where the test processes the output of /usr/bin/dscl), where a user does not have a real name, dscl does not output a corresponding line, and as a result the test's processing code had undef in a data structure. The implicit conversion of this to an empty string was correct for the test to pass, but generates a warning when warnings are enabled. Hence disable this specific warning for the minimal scope where the conversion is wanted behaviour.
As noted in the comments in the code for this commit, VMS builds add a '.com' suffix to scripts and utilities and hence their names don't match what is in podcheck's db. This canonicalizes such names back to what the db is expecting.
The only change is to move a block of code around. This is to prepare for future commits
The code for autovivifying coresubs for method calls ended up calling hv_store(stash,name,len,(SV *)gv,0) where gv is already in the stash under that entry. Since hv_store takes ownership of one reference count and decrements that of what it overwrites (which is the same gv in this case), it ends up freeing the gv prematurely. It ended up making that call because S_maybe_add_coresub needs the stash to get its ENAME (which happens when called by gv_fetchmeth), but it also assumed that the presence of the stash meant the gv needed to be stored in it (as is the case with the other caller, gv_fetchpvn_flags). This patch reuses the fullen (full length) parameter as a flag to indicate that that hv_store call should be skipped. These workarounds for the assumptions that newATTRSUB makes are start- ing to make inlining look very attractive....
Add TAP generation and a --tap option to Porting/checkcfgvar.pl. In checkcfgvar.t, document its purpose, and the likely way to fix the problems that it has flagged up. This is a prototype before adding similar instructions to the other t/porting tests.
Previously it had custom code to change directory to the top of the source tree, and to convert the library paths to absolute. TestInit has common code for this.
It's a croak(), not a warning, so doesn't really belong in lib/warnings.t [This also implicitly fixes the wrong expected output of 69dc7e4]
% perl -e 'print "package F;\n # \xF1\n;1;"' > x.pl % perl '-Mopen=:encoding(utf8)' -e 'require "x.pl"' utf8 "\xF1" does not map to Unicode at x.pl line 1. Bit of a surprising discovery; Turns out that passing a single ":" for the layers skips the fetch from the context layers: perl -wE 'use open qw( :encoding(UTF-8) ); open my $fh, "<:", "etc"; say PerlIO::get_layers($fh);' That will only get the relevant default layers, while removing the colons makes it work as usual -- So we can abuse this (mis)feature to fix the bug.
This test was relying on a bug in require that causes it to use what- ever I/O layers are active in require‘s *caller* when opening a file [perl #96008]. This rewrites the test using the example in ticket #75722. Since it no longer has anything to do with open.pm, it is now in t/lib/warnings/perlio.
This will probably not be used, but ought to be here for complete- ness’ sake. Method lookup needs to trigger the autovivification of coresubs. Since it does not use gv_fetchpvn_flags, the coresub-autovification is now in a separate static function, so that both standard gv lookup and method lookup can share it.