From: Rafael Kitover Date: Wed, 13 Apr 2011 09:17:18 +0000 (-0400) Subject: remove Class::Load dependency X-Git-Tag: 0.07011~129 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7eff9ea321fc3cfbeec4f27fdfc2e91f5b4e59d0;p=dbsrgits%2FDBIx-Class-Schema-Loader.git remove Class::Load dependency --- diff --git a/Makefile.PL b/Makefile.PL index f40eb82..2291030 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -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'; diff --git a/lib/DBIx/Class/Schema/Loader/Base.pm b/lib/DBIx/Class/Schema/Loader/Base.pm index c298376..fd48d40 100644 --- a/lib/DBIx/Class/Schema/Loader/Base.pm +++ b/lib/DBIx/Class/Schema/Loader/Base.pm @@ -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) || [] }; }