Re: goto return ?



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?
.



Relevant Pages

  • RE: Upper / Fill Series Function in Excel
    ... not what the average user knows. ... Does your boss understand Excel? ... addresses were in column A, and in Column B, I reference the column using ...
    (microsoft.public.excel.misc)
  • Re: Modules(index) and Modules("name") return different modules?
    ... You can edit the code in a referenced MDB, ... are discarded *without warning* when you close. ... >> module in every library database reference. ...
    (microsoft.public.access.modulesdaovba)
  • Variety of XML questions;
    ... parents affect the reference? ... (Does parsing create the node instances, or just parses the XML into ... Bearing encapsulation and concurrency in mind, ... changes to a node copy the node, edit, then replace the node in the original ...
    (microsoft.public.dotnet.xml)
  • Re: Update a table using a form
    ... I have the properties set as you advised. ... when you open the form the "reference number" ... Access will give you a Sub and End Sub line; edit it to ...
    (microsoft.public.access.formscoding)
  • Re: change excel document into word document
    ... ' requires a reference to the Word Object library: ... Set wdApp = New Word.Application ... Set wdDoc = Nothing ... Edit> Copy ...
    (microsoft.public.excel.misc)