If Errno is loaded after the compiler has parsed the C<exists &Errno::EBADF>
later in the script, then the intent of that test is subverted - &Errno::EBADF
does not exist, at least as far as the typeglob bound to that op is concerned,
and the test for $! is skipped. I suspect that these have been skipping since
the implementation of Errno was changed in
42607a60df6df19b in May 2010 to
reduce its memory footprint by 55%.
BEGIN {
chdir 't' if -d 't';
@INC = '../lib';
+ require './test.pl';
+ eval 'use Errno';
+ die $@ if $@ and !is_miniperl();
}
use strict 'vars';
-eval 'use Errno';
-die $@ if $@ and !$ENV{PERL_CORE_MINITEST};
print "1..21\n";
chdir 't' if -d 't';
@INC = '../lib';
require './test.pl';
+ eval 'use Errno';
+ die $@ if $@ and !is_miniperl();
}
use strict;
-eval 'use Errno';
-die $@ if $@ and !$ENV{PERL_CORE_MINITEST};
plan tests => 2;
BEGIN {
chdir 't' if -d 't';
@INC = '../lib';
+ require './test.pl';
+ eval 'use Errno';
+ die $@ if $@ and !is_miniperl();
}
# Just a few very basic tests cribbed from t/io/print.t,
# the same way as print in any case.
use strict 'vars';
-eval 'use Errno';
-die $@ if $@ and !$ENV{PERL_CORE_MINITEST};
-
use feature "say";
say "1..12";