[Jifty-commit] r4998 - in Jifty-DBI/trunk: lib/Jifty/DBI

Jifty commits jifty-commit at lists.jifty.org
Tue Feb 5 14:03:00 EST 2008


Author: sartak
Date: Tue Feb  5 14:03:00 2008
New Revision: 4998

Modified:
   Jifty-DBI/trunk/   (props changed)
   Jifty-DBI/trunk/lib/Jifty/DBI/Handle.pm

Log:
 r51367 at onn:  sartak | 2008-02-05 14:02:24 -0500
 Pass all data to logging hook so they can do more interesting things with them immediately


Modified: Jifty-DBI/trunk/lib/Jifty/DBI/Handle.pm
==============================================================================
--- Jifty-DBI/trunk/lib/Jifty/DBI/Handle.pm	(original)
+++ Jifty-DBI/trunk/lib/Jifty/DBI/Handle.pm	Tue Feb  5 14:03:00 2008
@@ -291,14 +291,14 @@
     my $duration  = shift;
     my @bind      = @_;
 
-    my $results = {};
+    my %results;
+    my @log = (Time::HiRes::time(), $statement, [@bind], $duration, \%results);
+
     while (my ($name, $code) = each %{ $self->{'_logsqlhooks'} || {} }) {
-        $results->{$name} = $code->();
+        $results{$name} = $code->(@log);
     }
 
-    push @{ $self->{'StatementLog'} },
-        ( [ Time::HiRes::time(), $statement, [@bind], $duration, $results ] );
-
+    push @{ $self->{'StatementLog'} }, \@log;
 }
 
 =head2 clear_sql_statement_log


More information about the Jifty-commit mailing list