X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FRelationship%2FProxyMethods.pm;h=03658ee20dd059095e81674e97d226e646c85435;hb=01afee83a917866ef60276f6d29f5c08766d9741;hp=11a4e286f852a64d77f28b673ceea9ed4fdbc4e9;hpb=223b8fe3185dba976b275c120ba7a07c05c06644;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Relationship/ProxyMethods.pm b/lib/DBIx/Class/Relationship/ProxyMethods.pm index 11a4e28..03658ee 100644 --- a/lib/DBIx/Class/Relationship/ProxyMethods.pm +++ b/lib/DBIx/Class/Relationship/ProxyMethods.pm @@ -1,18 +1,18 @@ -package DBIx::Class::Relationship::ProxyMethods; +package # hide from PAUSE + DBIx::Class::Relationship::ProxyMethods; use strict; use warnings; -use base qw/Class::Data::Inheritable/; +use base qw/DBIx::Class/; -sub add_relationship { - my ($class, $rel, @rest) = @_; - my $ret = $class->NEXT::ACTUAL::add_relationship($rel => @rest); - if (my $proxy_list = $class->_relationships->{$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 {