X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FRelationship%2FProxyMethods.pm;h=03f32c4b7fbe985d1fb7efb08326b1d1910f0a05;hb=412db1f428e95eeeac2a63f12b3c2d1ce1b3223a;hp=7ac439bc2c3c71587043234567b1c32a5821fc45;hpb=4685e00665ca987cd3acae87bc1d988f8ab56b31;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/lib/DBIx/Class/Relationship/ProxyMethods.pm b/lib/DBIx/Class/Relationship/ProxyMethods.pm index 7ac439b..03f32c4 100644 --- a/lib/DBIx/Class/Relationship/ProxyMethods.pm +++ b/lib/DBIx/Class/Relationship/ProxyMethods.pm @@ -5,14 +5,13 @@ use warnings; use base qw/DBIx::Class/; -sub add_relationship { - my ($class, $rel, @rest) = @_; - my $ret = $class->next::method($rel => @rest); - if (my $proxy_list = $class->relationship_info($rel)->{attrs}{proxy}) { +sub register_relationship { + my ($class, $rel, $info) = @_; + if (my $proxy_list = $info->{attrs}{proxy}) { $class->proxy_to_related($rel, (ref $proxy_list ? @$proxy_list : $proxy_list)); } - return $ret; + $class->next::method($rel, $info); } sub proxy_to_related {