X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FRelationship%2FProxyMethods.pm;h=7b76499c6534221414e833292cc2bcc4e167d1d9;hb=b7bbc39f79d4f179f85ef655981bdb68411f0a2a;hp=03f32c4b7fbe985d1fb7efb08326b1d1910f0a05;hpb=71e65b395be8133d54b110a499f9e9619111c1f6;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/lib/DBIx/Class/Relationship/ProxyMethods.pm b/lib/DBIx/Class/Relationship/ProxyMethods.pm index 03f32c4..7b76499 100644 --- a/lib/DBIx/Class/Relationship/ProxyMethods.pm +++ b/lib/DBIx/Class/Relationship/ProxyMethods.pm @@ -1,10 +1,16 @@ -package DBIx::Class::Relationship::ProxyMethods; +package # hide from PAUSE + DBIx::Class::Relationship::ProxyMethods; use strict; use warnings; - +use Sub::Name (); use base qw/DBIx::Class/; +our %_pod_inherit_config = + ( + class_map => { 'DBIx::Class::Relationship::ProxyMethods' => 'DBIx::Class::Relationship' } + ); + sub register_relationship { my ($class, $rel, $info) = @_; if (my $proxy_list = $info->{attrs}{proxy}) { @@ -19,7 +25,8 @@ sub proxy_to_related { no strict 'refs'; no warnings 'redefine'; foreach my $proxy (@proxy) { - *{"${class}::${proxy}"} = + my $name = join '::', $class, $proxy; + *$name = Sub::Name::subname $name, sub { my $self = shift; my $val = $self->$rel;