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