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
69dc7e4bdb8e397c]
skip_all_without_perlio();
}
-plan tests => 44;
+plan tests => 45;
use_ok('PerlIO');
}
+{
+ # see RT #75722, RT #96008
+ fresh_perl_like(<<'EOP',
+unshift @INC, sub {
+ return undef unless caller eq "main";
+ open my $fh, "<", \1;
+ $fh;
+};
+require Symbol; # doesn't matter whether it exists or not
+EOP
+ qr/\ARecursive call to Perl_load_module in PerlIO_find_layer at/s,
+ {stderr => 1},
+ 'Mutal recursion between Perl_load_module and PerlIO_find_layer croaks');
+}
END {
unlink_all $txt;
__END__
-# perlio [PerlIO_find_layer]
-unshift @INC, sub {
- return undef unless caller eq "main";
- open my $fh, "<", \1;
- $fh;
-};
-require Symbol; # doesn't matter whether it exists or no
-EXPECT
-Recursive call to Perl_load_module in PerlIO_find_layer at - line 5.
-BEGIN failed--compilation aborted.
-########
-
# perlio [PerlIO_parse_layers]
no warnings 'layer';
open(F, ">:-aa", "bb");