[Jifty-commit] r5054 - in Jifty-DBI/branches/tisql: lib/Jifty/DBI

Jifty commits jifty-commit at lists.jifty.org
Tue Feb 5 21:20:06 EST 2008


Author: ruz
Date: Tue Feb  5 21:20:06 2008
New Revision: 5054

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

Log:
 r4999 at cubic-pc (orig r4998):  sartak | 2008-02-05 22:03:00 +0300
  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/branches/tisql/lib/Jifty/DBI/Handle.pm
==============================================================================
--- Jifty-DBI/branches/tisql/lib/Jifty/DBI/Handle.pm	(original)
+++ Jifty-DBI/branches/tisql/lib/Jifty/DBI/Handle.pm	Tue Feb  5 21:20:06 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