1__END__ 2# NAME goto into foreach 3no warnings 'deprecated'; 4goto f; 5foreach(1){f:} 6EXPECT 7Can't "goto" into the middle of a foreach loop at - line 3. 8######## 9# NAME goto into given 10no warnings 'deprecated'; 11goto f; 12CORE::given(1){f:} 13EXPECT 14Can't "goto" into a "given" block at - line 3. 15######## 16# NAME goto from given topic expression 17no warnings 'deprecated'; 18CORE::given(goto f){f:} 19EXPECT 20Can't "goto" into a "given" block at - line 2. 21######## 22# NAME goto into expression 23no warnings 'deprecated'; 24eval { goto a; 1 + do { a: } }; warn $@; 25eval { goto b; meth { b: } }; warn $@; 26eval { goto c; map { c: } () }; warn $@; 27eval { goto d; f(do { d: }) }; die $@; 28EXPECT 29Can't "goto" into a binary or list expression at - line 2. 30Can't "goto" into a binary or list expression at - line 3. 31Can't "goto" into a binary or list expression at - line 4. 32Can't "goto" into a binary or list expression at - line 5. 33######## 34# NAME dump with computed label 35no warnings 'deprecated'; 36my $label = "foo"; 37CORE::dump $label; 38EXPECT 39Can't find label foo at - line 3. 40######## 41# NAME when outside given 42use 5.01; no warnings 'deprecated'; 43when(undef){} 44EXPECT 45Can't "when" outside a topicalizer at - line 2. 46######## 47# NAME default outside given 48use 5.01; 49default{} 50EXPECT 51Can't "default" outside a topicalizer at - line 2. 52######## 53# NAME croak with read only $@ 54eval '"a" =~ /${*@=\_})/'; 55die; 56# this would previously recurse infinitely in the eval 57EXPECT 58Unmatched ) in regex; marked by <-- HERE in m/_) <-- HERE / at (eval 1) line 1. 59 ...propagated at - line 2. 60