in reply to Go to?

From what I understood of the original problem -- Ronnie has to port some code over to Perl, from some shell scripts.

It makes perfect sense to me to try to keep the logic flow the same between programs for the first iteration. If the program's logic was working, it makes no sense to try to refactor it at the same time ... we have no idea what the deadlines are, or any other constraints on this project, and I don't personally see the point in spouting ideology on this particular point, as goto has its uses.

I've used goto in Perl quite a few times in the past year. Most frequently, it's inside functions like AUTOLOAD that generate closures, and then goto the new function ... or any other time I insert logging functions in a child that I don't want to show up if the parent looks at caller:

my $obj = child->new(); $obj->do_something(); my $obj2 = child2->new(); $obj2->do_something(); exit; package parent; use Data::Dumper; sub do_something { warn Dumper { 'caller' => [ caller ] }; } sub new { my $class = shift; return bless {}, $class }; package child; use base qw( parent ); sub do_something { my $self = shift; $self->SUPER::do_something; } package child2; use base qw( parent ); sub do_something { goto &{'parent::do_something'}; }