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

Re: Difference in perl_mod

by Anonymous Monk
on Nov 26, 2012 at 21:51 UTC ( #1005768=note: print w/ replies, xml ) Need Help??


in reply to Difference in perl_mod

Well, I am, too, waiting for an explanation of simpleconnect(). Anyway,

  • use strict;
  • use warnings; and check error_log
  • my result=0; is missing a $
  • $result is scoped wrong
  • The eval appears to be useless (I don't recall DBI->connect dying without RaiseError)
  • You really ought to set RaiseError to 1.
  • Databases stop the transaction and refuse to continue when an error is encountered.
  • You ought to commit even with zero changed rows. (Or roll back.)
  • Check the error log for database errors.


Comment on Re: Difference in perl_mod
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2015-07-02 06:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (30 votes), past polls