[Bast-commits] r5842 - DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/Storage

ribasushi at dev.catalyst.perl.org ribasushi at dev.catalyst.perl.org
Sun Mar 29 12:02:24 BST 2009


Author: ribasushi
Date: 2009-03-29 12:02:24 +0100 (Sun, 29 Mar 2009)
New Revision: 5842

Modified:
   DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/Storage/Statistics.pm
Log:
Statistics is too noisy when a debug callback is present

Modified: DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/Storage/Statistics.pm
===================================================================
--- DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/Storage/Statistics.pm	2009-03-29 10:43:08 UTC (rev 5841)
+++ DBIx-Class/0.08/branches/multi_stuff/lib/DBIx/Class/Storage/Statistics.pm	2009-03-29 11:02:24 UTC (rev 5842)
@@ -83,6 +83,8 @@
 sub txn_begin {
   my $self = shift;
 
+  return if $self->callback;
+
   $self->print("BEGIN WORK\n");
 }
 
@@ -94,6 +96,8 @@
 sub txn_rollback {
   my $self = shift;
 
+  return if $self->callback;
+
   $self->print("ROLLBACK\n");
 }
 
@@ -105,6 +109,8 @@
 sub txn_commit {
   my $self = shift;
 
+  return if $self->callback;
+
   $self->print("COMMIT\n");
 }
 
@@ -116,6 +122,8 @@
 sub svp_begin {
   my ($self, $name) = @_;
 
+  return if $self->callback;
+
   $self->print("SAVEPOINT $name\n");
 }
 
@@ -127,7 +135,9 @@
 sub svp_release {
   my ($self, $name) = @_;
 
- $self->print("RELEASE SAVEPOINT $name\n");
+  return if $self->callback;
+
+  $self->print("RELEASE SAVEPOINT $name\n");
 }
 
 =head2 svp_rollback
@@ -138,7 +148,9 @@
 sub svp_rollback {
   my ($self, $name) = @_;
 
- $self->print("ROLLBACK TO SAVEPOINT $name\n");
+  return if $self->callback;
+
+  $self->print("ROLLBACK TO SAVEPOINT $name\n");
 }
 
 =head2 query_start




More information about the Bast-commits mailing list