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

Re^2: How to safely test if a database handle is capable of transactions?

by larryl (Monk)
on Nov 19, 2008 at 19:40 UTC ( [id://724699]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    eval {
      local $dbh->{AutoCommit} = 0;
    };
    $self->{_can_do_transactions} = $@ ? 0 : 1;
    
  2. or download this
    $self->{_can_do_transactions} = eval {
      local $dbh->{AutoCommit} = 0;
      1
    };
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2024-03-29 15:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found