Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^3: sql-o-matic

by massa (Hermit)
on Sep 16, 2008 at 16:26 UTC ( [id://711733]=note: print w/replies, xml ) Need Help??


in reply to Re^2: sql-o-matic
in thread sql-o-matic

Sorry but, even if your phrase holds a truth value, you are wrong in many levels.
  1. die can be overriden in one way or another, and start returning something!
  2. my $c = 'shat'; eval { $c = DBI->connect(xxx) || die } keeps the old value in $c (instead of putting undef there, like or would do), and this may not be what the user wants...
  3. it would be nice if people grew accostumed not to mix = and || inadvertently.
So, my $c = DBI->connect(xxx) or die is the right idiom for good reasons.
[]s, HTH, Massa (κς,πμ,πλ)

Log In?
Username:
Password:

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

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

    No recent polls found