pass on errors in component_class except when the file for the module itself wasn...
David Kamholz [Fri, 4 Aug 2006 08:55:37 +0000 (08:55 +0000)]
lib/DBIx/Class/AccessorGroup.pm

index 4478f41..8035725 100644 (file)
@@ -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 {