Merge 'normalize_connect_info' into 'trunk'
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Schema.pm
index 1199a10..1121682 100644 (file)
@@ -5,7 +5,7 @@ use warnings;
 
 use DBIx::Class::Exception;
 use Carp::Clan qw/^DBIx::Class/;
-use Scalar::Util qw/weaken/;
+use Scalar::Util ();
 use File::Spec;
 use Sub::Name ();
 use Module::Find();
@@ -1186,9 +1186,9 @@ sub freeze {
 
 =back
 
-Recommended way of dcloning objects. If a C<DBIx::Class::Row> object is passed
-its references to the schema object (which itself is B<not> cloned)
-are properly maintained.
+Recommended way of dcloning L<DBIx::Class::Row> and L<DBIx::Class::ResultSet>
+objects so their references to the schema object
+(which itself is B<not> cloned) are properly maintained.
 
 =cut
 
@@ -1295,7 +1295,7 @@ sub _register_source {
 
   $source = $source->new({ %$source, source_name => $moniker });
   $source->schema($self);
-  weaken($source->{schema}) if ref($self);
+  Scalar::Util::weaken($source->{schema}) if ref($self);
 
   my $rs_class = $source->result_class;