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

Re: A new idiom -or- I Hate Unless

by Juerd (Abbot)
on Aug 23, 2004 at 09:09 UTC ( [id://385028]=note: print w/replies, xml ) Need Help??


in reply to A new idiom -or- I Hate Unless

I agree. I always try to write error handlers using "or". Preferably with "or die", but "or do" isn't a problem. But it is certainly not now. I have been doing this for just over a year now, but I have copied it from someone else.

In my style guide is:

Error checking is done using or. This means open or do { ... } instead of unless (open) { ... } when handling the error is more than a simple statement.

Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (1)
As of 2024-04-16 16:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found