requires => {
'Data::Page' => 2.00,
'DBI' => 1.40,
- 'UNIVERSAL::require' => 0,
'Scalar::Util' => 0,
'SQL::Abstract' => 1.20,
'SQL::Abstract::Limit' => 0.101,
'Module::Find' => 0,
'Storable' => 0,
'Class::Data::Accessor' => 0.01,
- # Following for CDBICompat only
'Carp::Clan' => 0,
},
recommends => {
use warnings;
use Carp::Clan qw/^DBIx::Class/;
-use UNIVERSAL::require;
use base qw/DBIx::Class/;
sub compose_connection {
my ($self, $target, @info) = @_;
my $base = 'DBIx::Class::ResultSetProxy';
- $base->require;
+ eval "require ${base};";
+ $self->throw_exception("No arguments to load_classes and couldn't load".
+ " ${base} ($@)") if $@;
if ($self eq $target) {
# Pathological case, largely caused by the docs on early C::M::DBIC::Plain
my $storage_class = $self->storage_type;
$storage_class = 'DBIx::Class::Storage'.$storage_class
if $storage_class =~ m/^::/;
- $storage_class->require;
+ eval "require ${storage_class};";
+ $self->throw_exception("No arguments to load_classes and couldn't load".
+ " ${storage_class} ($@)") if $@;
my $storage = $storage_class->new;
$storage->connect_info(\@info);
$self->storage($storage);