I have a resultset question. Is this by design, or by accident?
This fails
$schema->resultset('Carts')->search(undef, undef);
with:
> Use of uninitialized value in anonymous hash ({}) at
> C:/strawberry-perl/perl/site/lib/DBIx/Class/ResultSet.pm line 190.
> DBIx::Class::ResultSet::search(): DBD::SQLite::db prepare_cached failed: near
> "IS": syntax error(1) at dbdimp.c line 269
> at C:/strawberry-perl/perl/site/lib/DBIx/Class/Storage/DBI.pm line 978.
This succeeds:
$schema->resultset('Carts')->search(undef, {});
They're both equally futile when written manually. But in things like
Handel, where I'm simply passing @_ down the line to DBIC search
sub search {
my $self = shift;
magic...
$schema->resultset('Carts')->search(@_);
}
$handel->search($filter, $options);
It's pita to check @_ for undefs, and strip them out, rather than
having DBIC just ignore them...
Of course, I could be off my rocker...
-=Chris
signature.asc
Description: OpenPGP digital signature
_______________________________________________ List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class Wiki: http://dbix-class.shadowcatsystems.co.uk/ IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/ Searchable Archive: http://www.mail-archive.com/[email protected]/
