Limit the void context search exceptions to non-dbic code
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / ResultSourceHandle.pm
index d7d0190..e39bfbc 100644 (file)
@@ -81,13 +81,13 @@ sub STORABLE_freeze {
     delete $to_serialize->{schema};
     $to_serialize->{_frozen_from_class} = $self->schema->class($self->source_moniker);
 
-    return (Storable::freeze($to_serialize));
+    return (Storable::nfreeze($to_serialize));
 }
 
 =head2 STORABLE_thaw
 
 Thaws frozen handle. Resets the internal schema reference to the package
-variable C<$thaw_schema>. The recomened way of setting this is to use 
+variable C<$thaw_schema>. The recommended way of setting this is to use 
 C<< $schema->thaw($ice) >> which handles this for you.
 
 =cut
@@ -106,7 +106,8 @@ sub STORABLE_thaw {
         $self->{schema} = $rs->schema if $rs;
     }
 
-    carp "Unable to restore schema" unless $self->{schema};
+    carp "Unable to restore schema. Look at 'freeze' and 'thaw' methods in DBIx::Class::Schema."
+        unless $self->{schema};
 }
 
 =head1 AUTHOR