We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f31afb2 commit e940a13Copy full SHA for e940a13
t/op/goto.t
@@ -12,7 +12,7 @@ BEGIN {
12
use warnings;
13
use strict;
14
use Config;
15
-plan tests => 52;
+plan tests => 53;
16
17
our $TODO;
18
@@ -556,3 +556,20 @@ pass("bug 132799");
556
"goto LABEL can't be used to go into a construct that is optimized away");
557
}
558
559
+note("Tests of functionality fatalized in Perl 5.44");
560
+my $msg = q|Use of "goto" to jump into a construct is no longer permitted|;
561
+
562
+{
563
564
+ my $false = 0;
565
+ my $thisok = 0;
566
567
+ local $@;
568
+ eval {
569
+ for (my $p=1; $p && goto A; $p=0) {
570
+ A: $thisok = 1;
571
+ }
572
+ };
573
+ like($@, qr/$msg/,
574
+ "Got expected exception; formerly: following goto and for(;;) loop");
575
+}
0 commit comments