Just need to figure you how to get the functionality that:
goto &CORE::return;
feels like it should do assuming I knew how to reference return...
nah
Thanks for your examples, however if a change was needed you'd still
have to change every instance instead of the single function.
So I'd still really like to figure out how to get
goto &CORE::return;
type behavior despite the fact that you can't see why or when you'd need it.
For example I can, say, create an app that always:
error_return("Oops I did it again: $!", @return) if $whatever;
instead of
if($whatever) {
carp "Oops I did it again: $!";
return @return;
}
Why?
because say I've done that in hundreds of places acorss dozens of
files., and the boss says "it needs to log to a file also".
now I have to edit every instance of it and quite possible miss some.
Or I could just add the logging code to error_return() and it would take
seconds instead of hours or days and would have 100% coverage instead of
possibly missing some.
It'd be infinitely more maintainable and is a basic idea used throughout
Perl (Exporter's export_to_level and Carp's CarpLevel etc)
So any other ideas anyone?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>