Some cleanups around loading/use of DBIx::Class::Exception (no func. changes)
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / ResultSourceHandle.pm
index a878613..733db83 100644 (file)
@@ -5,15 +5,10 @@ use warnings;
 
 use base qw/DBIx::Class/;
 
-use Storable qw/nfreeze thaw/;
-use DBIx::Class::Exception;
 use Try::Tiny;
-
 use namespace::clean;
 
 use overload
-    # on some RH perls the following line causes serious performance problem
-    # see https://bugzilla.redhat.com/show_bug.cgi?id=196836
     q/""/ => sub { __PACKAGE__ . ":" . shift->source_moniker; },
     fallback => 1;
 
@@ -95,20 +90,20 @@ sub STORABLE_freeze {
     : $self->{_detached_source}->result_class
   ;
 
-  nfreeze($to_serialize);
+  Storable::nfreeze($to_serialize);
 }
 
 =head2 STORABLE_thaw
 
 Thaws frozen handle. Resets the internal schema reference to the package
-variable C<$thaw_schema>. The recommended 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
 
 sub STORABLE_thaw {
   my ($self, $cloning, $ice) = @_;
-  %$self = %{ thaw($ice) };
+  %$self = %{ Storable::thaw($ice) };
 
   my $from_class = delete $self->{_frozen_from_class};