From: Cory G Watson Date: Fri, 8 Sep 2006 16:01:08 +0000 (+0000) Subject: De 'gphatify' Statistics.pm per mst's request *grin* X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=04cf5bbf360c2b6a4738056f7379678d77d426cb;p=dbsrgits%2FDBIx-Class-Historic.git De 'gphatify' Statistics.pm per mst's request *grin* --- diff --git a/lib/DBIx/Class/Storage/Statistics.pm b/lib/DBIx/Class/Storage/Statistics.pm index eaa3ee9..4641bc9 100644 --- a/lib/DBIx/Class/Storage/Statistics.pm +++ b/lib/DBIx/Class/Storage/Statistics.pm @@ -30,10 +30,10 @@ Returns a new L object. =cut sub new { - my $self = {}; - bless $self, (ref($_[0]) || $_[0]); + my $self = {}; + bless $self, (ref($_[0]) || $_[0]); - return $self; + return $self; } =head2 debugfh @@ -49,9 +49,9 @@ Called when a transaction begins. =cut sub txn_begin { - my $self = shift(); + my $self = shift; - $self->debugfh->print("BEGIN WORK\n"); + $self->debugfh->print("BEGIN WORK\n"); } =head2 txn_rollback @@ -60,9 +60,9 @@ Called when a transaction is rolled back. =cut sub txn_rollback { - my $self = shift(); + my $self = shift; - $self->debugfh->print("ROLLBACK\n"); + $self->debugfh->print("ROLLBACK\n"); } =head2 txn_commit @@ -71,9 +71,9 @@ Called when a transaction is committed. =cut sub txn_commit { - my $self = shift(); + my $self = shift; - $self->debugfh->print("COMMIT\n"); + $self->debugfh->print("COMMIT\n"); } =head2 query_start @@ -83,17 +83,17 @@ executed and subsequent arguments are the parameters used for the query. =cut sub query_start { - my ($self, $string, @bind) = @_; + my ($self, $string, @bind) = @_; - my $message = "$string: ".join(', ', @bind)."\n"; + my $message = "$string: ".join(', ', @bind)."\n"; - if(defined($self->callback())) { - $string =~ m/^(\w+)/; - $self->callback()->($1, $message); - return; - } + if(defined($self->callback)) { + $string =~ m/^(\w+)/; + $self->callback()->($1, $message); + return; + } - $self->debugfh->print($message); + $self->debugfh->print($message); } =head2 query_end @@ -102,8 +102,7 @@ Called when a query finishes executing. Has the same arguments as query_start. =cut sub query_end { - my $self = shift(); - my $string = shift(); + my ($self, $string) = @_; } 1;