remove Class::Load dependency
Rafael Kitover [Wed, 13 Apr 2011 09:17:18 +0000 (05:17 -0400)]
Makefile.PL
lib/DBIx/Class/Schema/Loader/Base.pm

index f40eb82..2291030 100644 (file)
@@ -47,7 +47,6 @@ requires 'Carp::Clan'                  => 0;
 requires 'Class::Inspector'            => 0;
 requires 'DBIx::Class'                 => '0.08127';
 requires 'Class::Unload'               => 0;
-requires 'Class::Load'                 => 0;
 requires 'File::Slurp'                 => '9999.13';
 requires 'List::MoreUtils'             => 0;
 requires 'namespace::clean'            => '0.20';
index c298376..fd48d40 100644 (file)
@@ -22,7 +22,6 @@ use DBIx::Class::Schema::Loader::Utils qw/split_name dumper_squashed eval_withou
 use DBIx::Class::Schema::Loader::Optional::Dependencies ();
 use Try::Tiny;
 use DBIx::Class ();
-use Class::Load 'load_class';
 use namespace::clean;
 
 our $VERSION = '0.07010';
@@ -1071,7 +1070,7 @@ sub _relbuilder {
             ->{ $self->naming->{relationships}};
 
         my $relbuilder_class = 'DBIx::Class::Schema::Loader::RelBuilder'.$relbuilder_suff;
-        load_class $relbuilder_class;
+        $self->ensure_class_loaded($relbuilder_class);
         $relbuilder_class->new( $self );
 
     };
@@ -1651,7 +1650,7 @@ sub _is_result_class_method {
         }
 
         for my $class ($base, @components, $self->use_moose ? 'Moose::Object' : ()) {
-            load_class $class;
+            $self->ensure_class_loaded($class);
 
             push @methods, @{ Class::Inspector->methods($class) || [] };
         }