This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Revert "Introduce a "declaration after statement" into inline.h"
[perl5.git] / t / lib / croak / pp_hot
CommitLineData
c220e1a1 1__END__
858e07c4
FC
2# NAME local %$ref on last line of lvalue sub in lv cx
3 sub foo :lvalue { local %{\%foo} }
4 (foo) = 3;
5EXPECT
6Can't localize through a reference at - line 1.
7########
8# NAME local @$ref on last line of lvalue sub in lv cx
9 sub foo :lvalue { local @{\@foo} }
10 (foo) = 3;
11EXPECT
12Can't localize through a reference at - line 1.
13########
14# NAME local %$ref on last line of lvalue sub in non-lv cx
15 sub foo :lvalue { local %{\%foo} }
16 foo;
17EXPECT
18Can't localize through a reference at - line 1.
19########
20# NAME local @$ref on last line of lvalue sub in non-lv cx
21 sub foo :lvalue { local @{\@foo} }
22 foo;
23EXPECT
24Can't localize through a reference at - line 1.
25########
3da99855
FC
26# NAME \local %$ref
27 \local %{\%hash}
28EXPECT
29Can't localize through a reference at - line 1.
30########
31# NAME \local @$ref
32 \local @{\@hash}
33EXPECT
34Can't localize through a reference at - line 1.
35########
c220e1a1
FC
36# NAME calling undef sub belonging to undef GV
37 my $foosub = \&foo;
38 undef *foo;
39 &$foosub;
40EXPECT
41Undefined subroutine &main::foo called at - line 3.
42########
43# NAME calling undef sub resident in its GV
44 my $foosub = \&foo;
45 &$foosub;
46EXPECT
47Undefined subroutine &main::foo called at - line 2.
79a3e5ea
FC
48########
49# NAME calling undef scalar
50 &{+undef};
51EXPECT
52Can't use an undefined value as a subroutine reference at - line 1.
53########
54# NAME calling undef magical scalar
55 sub TIESCALAR {bless[]}
56 sub FETCH {}
57 tie $tied, "";
58 &$tied;
59EXPECT
60Can't use an undefined value as a subroutine reference at - line 4.