X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FRelationship%2FManyToMany.pm;h=137fb301f1597d62d41dec1f794fb1d2520be595;hb=a705b1758c359438b683daa2c2b1e8cb5a3377da;hp=2f47aabb807460c624de770f0a50426dcb02b7e1;hpb=f1f9ee174a02240bae18bf358c25240ad5039b23;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Relationship/ManyToMany.pm b/lib/DBIx/Class/Relationship/ManyToMany.pm index 2f47aab..137fb30 100644 --- a/lib/DBIx/Class/Relationship/ManyToMany.pm +++ b/lib/DBIx/Class/Relationship/ManyToMany.pm @@ -7,6 +7,11 @@ use warnings; use Carp::Clan qw/^DBIx::Class/; use Sub::Name (); +our %_pod_inherit_config = + ( + class_map => { 'DBIx::Class::Relationship::ManyToMany' => 'DBIx::Class::Relationship' } + ); + sub many_to_many { my ($class, $meth, $rel, $f_rel, $rel_attrs) = @_; @@ -59,15 +64,15 @@ EOW my $rs = $self->search_related($rel)->search_related( $f_rel, @_ > 0 ? @_ : undef, { %{$rel_attrs||{}}, %$attrs } ); - return $rs; + return $rs; }; my $meth_name = join '::', $class, $meth; *$meth_name = Sub::Name::subname $meth_name, sub { - my $self = shift; - my $rs = $self->$rs_meth( @_ ); - return (wantarray ? $rs->all : $rs); - }; + my $self = shift; + my $rs = $self->$rs_meth( @_ ); + return (wantarray ? $rs->all : $rs); + }; my $add_meth_name = join '::', $class, $add_meth; *$add_meth_name = Sub::Name::subname $add_meth_name, sub { @@ -97,7 +102,7 @@ EOW my $link = $self->search_related($rel)->new_result($link_vals); $link->set_from_related($f_rel, $obj); $link->insert(); - return $obj; + return $obj; }; my $set_meth_name = join '::', $class, $set_meth;