[Bast-commits] r7226 - DBIx-Class/0.08/branches/reduce_pings/lib/DBIx/Class/Storage

ribasushi at dev.catalyst.perl.org ribasushi at dev.catalyst.perl.org
Wed Aug 5 10:49:07 GMT 2009


Author: ribasushi
Date: 2009-08-05 10:49:06 +0000 (Wed, 05 Aug 2009)
New Revision: 7226

Modified:
   DBIx-Class/0.08/branches/reduce_pings/lib/DBIx/Class/Storage/DBI.pm
Log:
Clarify autocommit default

Modified: DBIx-Class/0.08/branches/reduce_pings/lib/DBIx/Class/Storage/DBI.pm
===================================================================
--- DBIx-Class/0.08/branches/reduce_pings/lib/DBIx/Class/Storage/DBI.pm	2009-08-05 10:36:01 UTC (rev 7225)
+++ DBIx-Class/0.08/branches/reduce_pings/lib/DBIx/Class/Storage/DBI.pm	2009-08-05 10:49:06 UTC (rev 7226)
@@ -441,14 +441,17 @@
     # _connect() never looks past $args[0] in this case
     %attrs = ()
   } else {
-    %attrs = (%{ $self->_dbi_connect_attributes }, %attrs);
+    %attrs = (
+      %{ $self->_default_dbi_connect_attributes || {} },
+      %attrs,
+    );
   }
 
   $self->_dbi_connect_info([@args, keys %attrs ? \%attrs : ()]);
   $self->_connect_info;
 }
 
-sub _dbi_connect_attributes {
+sub _default_dbi_connect_attributes {
   return { AutoCommit => 1 };
 }
 
@@ -2426,7 +2429,7 @@
 
 DBIx::Class can do some wonderful magic with handling exceptions,
 disconnections, and transactions when you use C<< AutoCommit => 1 >>
-combined with C<txn_do> for transaction support.
+(the default) combined with C<txn_do> for transaction support.
 
 If you set C<< AutoCommit => 0 >> in your connect info, then you are always
 in an assumed transaction between commits, and you're telling us you'd
@@ -2438,7 +2441,6 @@
 be with raw DBI.
 
 
-
 =head1 AUTHORS
 
 Matt S. Trout <mst at shadowcatsystems.co.uk>




More information about the Bast-commits mailing list