From: Peter Rabbitson Date: Thu, 8 Aug 2013 10:38:32 +0000 (+0200) Subject: Excise unreachable code X-Git-Tag: v0.08260~157 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1adea0d313e3793d244d6867dfe0dd842056e98b;p=dbsrgits%2FDBIx-Class.git Excise unreachable code --- diff --git a/lib/DBIx/Class/Relationship/BelongsTo.pm b/lib/DBIx/Class/Relationship/BelongsTo.pm index fbc78c1..9db06fe 100644 --- a/lib/DBIx/Class/Relationship/BelongsTo.pm +++ b/lib/DBIx/Class/Relationship/BelongsTo.pm @@ -47,7 +47,7 @@ sub belongs_to { } # explicit join condition - elsif (ref $cond) { + else { if (ref $cond eq 'HASH') { # ARRAY is also valid my $cond_rel; for (keys %$cond) { @@ -60,13 +60,6 @@ sub belongs_to { $cond = $cond_rel; } } - # dunno - else { - $class->throw_exception( - 'third argument for belongs_to must be undef, a column name, '. - 'or a join condition' - ); - } my $acc_type = ( ref $cond eq 'HASH'