On 03/26/2010 07:20 PM, Oleg Kostyuk wrote:
IIRC, evaluating ResultSet in scalar contex will issue count() call.
ResultSet is a blessed reference which is scalar.
Can't i say $something = $rs ?
Your @_ contain $self as first paramenter.
Probably, you forget "my $self = shift" as first line of sub?...
No i didn't.
BTW "my $self = shift" evaluates in scalar context.
So what makes DBIC incompatible with Params::Validate? It merely checks
class of ResultSet in my test case.
Like so:
SvGETMAGIC(value);
if (SvOK(value)&& (sv_isobject(value) || (SvPOK(value)&& !
looks_like_number(value)))) {
...
count = call_method("isa", G_SCALAR);
...
}
_______________________________________________
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]