Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^5: Goto-labels for exception handling?

by RonW (Parson)
on May 15, 2018 at 19:26 UTC ( [id://1214580]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Goto-labels for exception handling?
in thread Goto-labels for exception handling?

Personally, when it helps readability and maintainability, I have used goto - just very very rarely. Usually, where goto might be used, last can be used, though sometimes requires also using an error variable.

As for "missing receptors", the only idea I have come up with is to make sure that all "goto" labels are unique. A major problem doing this is finding all the labels. (Maybe Perl::Critic can help with this.) Pre- or post- fixing labels can reduce collisions, but this is very tedious extra work. Maybe defining Pluggable keywords, for example, throw and catch could automate this.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1214580]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-04-25 14:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found