Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: The Naughty Nought "OEO" blues

by mpeppler (Vicar)
on Jan 20, 2005 at 18:46 UTC ( [id://423766]=note: print w/replies, xml ) Need Help??


in reply to The Naughty Nought "OEO" blues

Not everyone uses the raiserror/eval functionality to catch errors - so the false return from do() and execute() make sense and are needed.

That said I agree that the "0 but true" return value is misleading/confusing - it's in general not a good idea to have a value returned that has both a status (success/failure) and a non-status (number of rows) signification. A better way might be to have all methods return a success/failure code, and have the rows affected be returned in a different way (i.e. with $sth->rows(), or in an attribute, or...).

It's obviously too late to change that for DBI 1.x, but you might want to lobby Tim for DBI 2.x.

Michael

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2024-04-20 03:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found