Hi all,
In the last few days, I've noticed people posting code examples like:
my $count = $schema->resultset('Foo')->search->count;
or
my @all = $schema->resultset('Foo')->search(
undef,
{}
)->all;
I don't think there's any reason to do this. $schema->resultset('Foo')
returns the same resultset that the empty search does, so you could have
just called "count" or "all" without having done the search.
Finally, for those using Catalyst, keep in mind that
$c->model('DBIC::Foo') is basically the same as
$c->model('DBIC')->resultset('Foo'), so there's no need to add an extra
search in this case either.
Regards,
Jonathan Rockway
--
print just => another => perl => hacker => if $,=$"
_______________________________________________
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]