From: Peter Rabbitson Date: Wed, 28 Sep 2016 09:25:47 +0000 (+0200) Subject: Restore the context sensitive m2m helper calling of ->search X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=13fd7cde4bfdf09da40fedc02ade59bffb766925;hp=97940e368df996e1fe6111fb14f560594dc4c0b2;p=dbsrgits%2FDBIx-Class.git Restore the context sensitive m2m helper calling of ->search Subtly modified in 11e469d9, this prevents things like the ::IgnoreWantarray helper from taking effect in this case. An audit of all other wantarray() invoking sites did not reveal other issues --- diff --git a/lib/DBIx/Class/Relationship/ManyToMany.pm b/lib/DBIx/Class/Relationship/ManyToMany.pm index 2812b6b..7075fbd 100644 --- a/lib/DBIx/Class/Relationship/ManyToMany.pm +++ b/lib/DBIx/Class/Relationship/ManyToMany.pm @@ -70,13 +70,8 @@ EOW quote_sub "${class}::${meth}", sprintf( <<'EOC', $rs_meth ), @main_meth_qsub_args; - DBIx::Class::_ENV_::ASSERT_NO_INTERNAL_INDIRECT_CALLS and DBIx::Class::_Util::fail_on_internal_call; - DBIx::Class::_ENV_::ASSERT_NO_INTERNAL_WANTARRAY and my $sog = DBIx::Class::_Util::fail_on_internal_wantarray; - - my $rs = shift->%s( @_ ); - - wantarray ? $rs->all : $rs; + shift->%s( @_ )->search; EOC