I've been away from a project for a while and so first thing I did was run
its tests:
I'm seeing this warning triggered from RestulSet.pm:
if( @_ > 1 and ! $rsrc->result_class->isa('DBIx::Class::CDBICompat') ) {
carp_unique 'search( %condition ) is deprecated, use search(
\%condition ) instead';
}
What I'm finding is that people have been passing multiple hash refs to
search(). For example,
$schema->resultset( 'Foo' )->search(
\%criteria,
{ join => 'some_join' },
{ prefetch => [ { one => 'two' } ] },
);
The problem, of course, is not that search() was called with a hash, but
that it was called incorrectly.
It looks to me like search_rs assumes there's two arguments passed with
$_[-1] being the \%attrs. If that's the case should search_rs die up
front if passed more than two arguments where the first argument looks like
a hashref (\%criteria) or it is undefined?
--
Bill Moseley
[email protected]
_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]