More indirect call removals: the second part of 77c3a5dc
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / CDBICompat / Relationships.pm
index 658305d..a5bfa5e 100644 (file)
@@ -129,7 +129,7 @@ sub has_many {
 
   if (@f_method) {
     quote_sub "${class}::${rel}", sprintf( <<'EOC', perlstring $rel), { '$rf' => \sub { my $o = shift; $o = $o->$_ for @f_method; $o } };
-      my $rs = shift->search_related( %s => @_);
+      my $rs = shift->related_resultset(%s)->search_rs( @_);
       $rs->{attrs}{record_filter} = $rf;
       return (wantarray ? $rs->all : $rs);
 EOC
@@ -213,7 +213,7 @@ sub search {
 }
 
 sub new_related {
-  return shift->search_related(shift)->new_result(shift);
+  return shift->search_related(shift)->new_result(@_);
 }
 
 =head1 FURTHER QUESTIONS?