Author: timbo
Date: Thu Mar  1 09:22:23 2007
New Revision: 9186

Modified:
   dbi/trunk/lib/DBD/Gofer.pm
   dbi/trunk/lib/DBD/Gofer/Transport/http.pm
   dbi/trunk/lib/DBI/Gofer/Execute.pm
   dbi/trunk/lib/DBI/Gofer/Transport/Base.pm

Log:
Use nfreeze for serialization.
Minor perf tweak.


Modified: dbi/trunk/lib/DBD/Gofer.pm
==============================================================================
--- dbi/trunk/lib/DBD/Gofer.pm  (original)
+++ dbi/trunk/lib/DBD/Gofer.pm  Thu Mar  1 09:22:23 2007
@@ -981,4 +981,12 @@
 Perhaps support transactions for transports where it's possible (ie null and 
stream)?
 Would make stream transport (ie ssh) more useful to more people.
 
+Make sth_result_attr more like dbh_attributes (using '*' etc)
+
+Add @val = FETCH_many(@names) to DBI in C and use in Gofer/Execute
+
+Add ($err, $errstr, $state) = $h->get_err
+
+Implement DBI::st::TIEHASH etc in C.
+
 =cut

Modified: dbi/trunk/lib/DBD/Gofer/Transport/http.pm
==============================================================================
--- dbi/trunk/lib/DBD/Gofer/Transport/http.pm   (original)
+++ dbi/trunk/lib/DBD/Gofer/Transport/http.pm   Thu Mar  1 09:22:23 2007
@@ -55,6 +55,8 @@
 
         # Pass request to the user agent and get a response back
         my $res = $ua->request($req);
+
+        # stash the response for use by receive_response
         $self->connection_info( $res );
     };
     return DBI::Gofer::Response->new({ err => 1, errstr => $@ }) if $@;
@@ -65,7 +67,7 @@
 sub receive_response {
     my $self = shift;
 
-    my $res = $self->connection_info || die;
+    my $res = $self->connection_info || die "no connection_info";
 
     if (not $res->is_success) {
         return DBI::Gofer::Response->new({

Modified: dbi/trunk/lib/DBI/Gofer/Execute.pm
==============================================================================
--- dbi/trunk/lib/DBI/Gofer/Execute.pm  (original)
+++ dbi/trunk/lib/DBI/Gofer/Execute.pm  Thu Mar  1 09:22:23 2007
@@ -391,8 +391,12 @@
     while ( my ($attr,$use) = each %$extra_sth_attr ) {
         next unless $use;
         my $v = eval { $sth->FETCH($attr) };
-        warn $@ if $@;
-        $meta{ $attr } = $v if defined $v;
+        if (defined $v) {
+            $meta{ $attr } = $v;
+        }
+        else {
+            warn $@ if $@;
+        }
     }
     my $NUM_OF_FIELDS = $meta{NUM_OF_FIELDS};
     $NUM_OF_FIELDS = $sth->FETCH('NUM_OF_FIELDS') unless defined 
$NUM_OF_FIELDS;

Modified: dbi/trunk/lib/DBI/Gofer/Transport/Base.pm
==============================================================================
--- dbi/trunk/lib/DBI/Gofer/Transport/Base.pm   (original)
+++ dbi/trunk/lib/DBI/Gofer/Transport/Base.pm   Thu Mar  1 09:22:23 2007
@@ -10,7 +10,7 @@
 use strict;
 use warnings;
 
-use Storable qw(freeze thaw);
+use Storable qw(nfreeze thaw);
 
 use base qw(DBI::Util::_accessor);
 
@@ -41,7 +41,7 @@
     $self->_dump("freezing ".ref($data), $data)
         if !$skip_trace and $self->trace;
     local $Storable::forgive_me = 1; # for CODE refs etc
-    my $frozen = eval { freeze($data) };
+    my $frozen = eval { nfreeze($data) };
     if ($@) {
         die "Error freezing ".ref($data)." object: $@";
     }

Reply via email to