X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FStatistics.pm;h=eaa3ee9d19e46e8cecba4245e6ca347ece0a8bca;hb=04786a4c19fe3964002b69e8a3dbb291524e0610;hp=60b59cd2bbd6c83a4a043c7c1f484404fc2312dd;hpb=6fe735fad298585c8d6982d496bcbb7b75400a6b;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage/Statistics.pm b/lib/DBIx/Class/Storage/Statistics.pm index 60b59cd..eaa3ee9 100644 --- a/lib/DBIx/Class/Storage/Statistics.pm +++ b/lib/DBIx/Class/Storage/Statistics.pm @@ -30,7 +30,8 @@ Returns a new L object. =cut sub new { - my $self = bless({}, ref($_[0]) || $_[0]); + my $self = {}; + bless $self, (ref($_[0]) || $_[0]); return $self; } @@ -82,16 +83,17 @@ executed and subsequent arguments are the parameters used for the query. =cut sub query_start { - my $self = shift(); - my $string = shift(); + my ($self, $string, @bind) = @_; + + my $message = "$string: ".join(', ', @bind)."\n"; if(defined($self->callback())) { $string =~ m/^(\w+)/; - $self->callback()->($1, $string); + $self->callback()->($1, $message); return; } - $self->debugfh->print("$string: " . join(', ', @_) . "\n"); + $self->debugfh->print($message); } =head2 query_end