From: Peter Rabbitson Date: Wed, 11 Sep 2013 09:31:30 +0000 (+0100) Subject: More unreachable code - we've already thrown on !defined $pri X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=52cd24db1219c355ff236324f4b4ae2ef93c657b;p=dbsrgits%2FDBIx-Class-Historic.git More unreachable code - we've already thrown on !defined $pri --- diff --git a/lib/DBIx/Class/Relationship/HasMany.pm b/lib/DBIx/Class/Relationship/HasMany.pm index bcf598c..f346997 100644 --- a/lib/DBIx/Class/Relationship/HasMany.pm +++ b/lib/DBIx/Class/Relationship/HasMany.pm @@ -26,11 +26,6 @@ sub has_many { "${class} has more" ) if $too_many; - $class->throw_exception( - "has_many needs a primary key to infer a join; ". - "${class} has none" - ) if !defined $pri && (!defined $cond || !length $cond); - my ($f_key,$guess); if (defined $cond && length $cond) { $f_key = $cond;