Open
Description
This works:
use strict;
use warnings;
use experimental qw(defer);
sub foo {
defer {
goto ham;
ham:
print "ham\n";
}
}
foo();
ham
This doesn't:
use strict;
use warnings;
use experimental qw(defer);
sub foo {
defer {
goto ham;
ham:
print "ham\n";
}
print "uh oh\n";
}
foo();
uhoh
Can't "goto" out of a defer block at works.pl line 8.
It seems anything after the defer block in the same scope breaks the goto detection...