This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #113576] Restore err msg for &{+undef}
[perl5.git] / t / lib / croak / pp_hot
... / ...
CommitLineData
1__END__
2# NAME calling undef sub belonging to undef GV
3 my $foosub = \&foo;
4 undef *foo;
5 &$foosub;
6EXPECT
7Undefined subroutine &main::foo called at - line 3.
8########
9# NAME calling undef sub resident in its GV
10 my $foosub = \&foo;
11 &$foosub;
12EXPECT
13Undefined subroutine &main::foo called at - line 2.
14########
15# NAME calling undef scalar
16 &{+undef};
17EXPECT
18Can't use an undefined value as a subroutine reference at - line 1.
19########
20# NAME calling undef magical scalar
21 sub TIESCALAR {bless[]}
22 sub FETCH {}
23 tie $tied, "";
24 &$tied;
25EXPECT
26Can't use an undefined value as a subroutine reference at - line 4.