projects
/
dbsrgits/DBIx-Class.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
Merged patched from andyg to throw useful errors during relationship loading
[dbsrgits/DBIx-Class.git]
/
lib
/
DBIx
/
Class
/
Relationship
/
HasMany.pm
diff --git
a/lib/DBIx/Class/Relationship/HasMany.pm
b/lib/DBIx/Class/Relationship/HasMany.pm
index
f30ff50
..
fdf5dd6
100644
(file)
--- a/
lib/DBIx/Class/Relationship/HasMany.pm
+++ b/
lib/DBIx/Class/Relationship/HasMany.pm
@@
-7,6
+7,9
@@
sub has_many {
my ($class, $rel, $f_class, $cond, $attrs) = @_;
eval "require $f_class";
+ if ($@) {
+ $class->throw($@) unless $@ =~ /Can't locate/;
+ }
unless (ref $cond) {
my ($pri, $too_many) = $class->primary_columns;