From: Brandon L. Black Date: Thu, 27 Jul 2006 18:15:25 +0000 (+0000) Subject: Module::Find is a real dep in Build.PL X-Git-Tag: v0.08010~43^2~22^2~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7cb86b38241cf9b5651ee4f8092ea9e3da43b164;p=dbsrgits%2FDBIx-Class.git Module::Find is a real dep in Build.PL --- diff --git a/lib/DBIx/Class/Schema.pm b/lib/DBIx/Class/Schema.pm index 0ec1897..d81320e 100644 --- a/lib/DBIx/Class/Schema.pm +++ b/lib/DBIx/Class/Schema.pm @@ -5,6 +5,7 @@ use warnings; use Carp::Clan qw/^DBIx::Class/; use Scalar::Util qw/weaken/; +require Module::Find; use base qw/DBIx::Class/; @@ -248,10 +249,6 @@ sub load_classes { } } } else { - eval "require Module::Find;"; - $class->throw_exception( - "No arguments to load_classes and couldn't load Module::Find ($@)" - ) if $@; my @comp = map { substr $_, length "${class}::" } Module::Find::findallmod($class); $comps_for{$class} = \@comp; @@ -307,8 +304,6 @@ All of the namespace and classname options to this method are relative to the schema classname by default. To specify a fully-qualified name, prefix it with a literal C<+>. -This method requires L to be installed on the system. - Example: # load My::Schema::ResultSource::CD, My::Schema::ResultSource::Artist, @@ -351,9 +346,6 @@ sub load_namespaces { $_ = $class . '::' . $_ if !s/^\+//; } - eval "require Module::Find"; - $class->throw_exception("Couldn't load Module::Find ($@)") if $@; - my %sources = map { (substr($_, length "${resultsource_namespace}::"), $_) } Module::Find::findallmod($resultsource_namespace);