Date: Sat, 24 May 2003 12:25:17 +0100
Message-ID: <
20030524112517.GA11761@fdgroup.com>
Subject: [PATCH] Re: [perl #22299] goto doesn't find label
From: Dave Mitchell <davem@fdgroup.com>
Date: Mon, 26 May 2003 13:47:11 +0100
Message-ID: <
20030526124710.GA17670@fdgroup.com>
p4raw-id: //depot/perl@19625
switch (CxTYPE(cx)) {
case CXt_EVAL:
leaving_eval = TRUE;
- if (CxREALEVAL(cx)) {
+ if (!CxTRYBLOCK(cx)) {
gotoprobe = (last_eval_cx ?
last_eval_cx->blk_eval.old_eval_root :
PL_eval_root);
# "This IS structured code. It's just randomly structured."
-print "1..29\n";
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = qw(. ../lib);
+}
+
+print "1..30\n";
+
+require "test.pl";
while ($?) {
$foo = 1;
}
print "ok 29 - goto in for(;;) with continuation\n";
+# bug #22299 - goto in require doesn't find label
+
+open my $f, ">goto01.pm" or die;
+print $f <<'EOT';
+package goto01;
+goto YYY;
+die;
+YYY: print "OK\n";
+1;
+EOT
+close $f;
+
+curr_test(30);
+my $r = runperl(prog => 'use goto01; print qq[DONE\n]');
+is($r, "OK\nDONE\n", "goto within use-d file");
+unlink "goto01.pm";
+
+
exit;
bypass: