X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FRelationship%2FBelongsTo.pm;h=471a417fc82c9b3a9b1d8ed3d125c283a3b24fbb;hb=21e5943602ce2cddef59eb882ace362d19889ee7;hp=eb10752867cfad5ac735ece43977b1cc42c37457;hpb=cef1bddae9e76fe52c0ca064acea9fc961977d24;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Relationship/BelongsTo.pm b/lib/DBIx/Class/Relationship/BelongsTo.pm index eb10752..471a417 100644 --- a/lib/DBIx/Class/Relationship/BelongsTo.pm +++ b/lib/DBIx/Class/Relationship/BelongsTo.pm @@ -7,6 +7,11 @@ package # hide from PAUSE use strict; use warnings; +our %_pod_inherit_config = + ( + class_map => { 'DBIx::Class::Relationship::BelongsTo' => 'DBIx::Class::Relationship' } + ); + sub belongs_to { my ($class, $rel, $f_class, $cond, $attrs) = @_; @@ -19,19 +24,14 @@ sub belongs_to { # no join condition or just a column name if (!ref $cond) { $class->ensure_class_loaded($f_class); - my %f_primaries = map { $_ => 1 } eval { $f_class->primary_columns }; + my %f_primaries = map { $_ => 1 } eval { $f_class->_pri_cols }; $class->throw_exception( - "Can't infer join condition for ${rel} on ${class}; ". - "unable to load ${f_class}: $@" + "Can't infer join condition for ${rel} on ${class}: $@" ) if $@; my ($pri, $too_many) = keys %f_primaries; $class->throw_exception( "Can't infer join condition for ${rel} on ${class}; ". - "${f_class} has no primary keys" - ) unless defined $pri; - $class->throw_exception( - "Can't infer join condition for ${rel} on ${class}; ". "${f_class} has multiple primary keys" ) if $too_many; @@ -79,12 +79,14 @@ sub belongs_to { return 1; } -=head1 AUTHORS - -Alexander Hartmaier - -Matt S. Trout +# Attempt to remove the POD so it (maybe) falls off the indexer -=cut +#=head1 AUTHORS +# +#Alexander Hartmaier +# +#Matt S. Trout +# +#=cut 1;