From: David Kamholz Date: Fri, 4 Aug 2006 08:55:37 +0000 (+0000) Subject: pass on errors in component_class except when the file for the module itself wasn... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c8c66fb7c28d0b1ff3eeb08e264469e81635a888;p=dbsrgits%2FDBIx-Class-Historic.git pass on errors in component_class except when the file for the module itself wasn't found --- diff --git a/lib/DBIx/Class/AccessorGroup.pm b/lib/DBIx/Class/AccessorGroup.pm index 4478f41..8035725 100644 --- a/lib/DBIx/Class/AccessorGroup.pm +++ b/lib/DBIx/Class/AccessorGroup.pm @@ -313,6 +313,11 @@ if called or an object or classdata called _$name if called on a class. sub set_component_class { my ($self, $set, $val) = @_; eval "require $val"; + if ($@) { + my $val_path = $val; + $val_path =~ s{::}{/}g; + carp $@ unless $@ =~ /^Can't locate $val_path/; + } if (ref $self) { return $self->{$set} = $val; } else {