[Dbix-class] Got a problem using DBIC+Params::Validate
Konstantin A. Pustovalov
lamoz at adriver.ru
Mon Mar 29 06:29:58 GMT 2010
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);
...
}
More information about the DBIx-Class
mailing list