Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Would you use 'goto' here?

by runrig (Abbot)
on Dec 06, 2001 at 03:20 UTC ( #129797=note: print w/replies, xml ) Need Help??


in reply to Would you use 'goto' here?

If you want to change the apparent caller, then by all means use goto (since it's to a code ref and not to a label). Though I might do:
goto &edit_office_product if $query->param( 'officeID' );
Though I think I might find it confusing if I'm looking at your error reporting which says 'edit_office_product()' was called from, e.g., foo() and I can't find any reference to edit_office_product in foo() because it was really called from edit_product() (don't know if this is the case from what you said). In which case I might do:
return edit_office_product(@_) if $query->param('officeID');

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://129797]
help
Chatterbox?
[MidLifeXis]: Has anyone been successful running prove under Windows with a --jobs parameter? It appears, even with (what appears to be) appropriately- configured parameters and up to date Test::Harness/TAP ::Harness that tests are still running serially.

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (9)
As of 2016-12-06 17:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (112 votes). Check out past polls.