in reply to Re: A matter of style
in thread A matter of style
The fact that do_my_stuff could throw an exception means that any of the recursive calls to walk_and_do could exit early, via the exception. And that is as it should be.sub walk_and_do { my $self = shift; $_->walk_and_do for @{$self->children}; $self->do_my_stuff; # could throw an exception. } eval { $root->walk_and_do; };
jdporter
The 6th Rule of Perl Club is -- There is no Rule #6.
|
|---|