Doesn’t such a method make the behavior of a programming language unpredictable?
Not if perl is sure that the situation allows optimizing out.
I would blindly assume that all returns could be optimized out in this script:
sub foo
{
# do something
return;
}
sub bar
{
# do something
return 'a scalar';
}
sub baz
{
# do something
return qw( a list );
}
foo();
bar();
baz();
exit();
Alexander
--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
|