[Catalyst] html-widget bug or design?
Nilson Santos Figueiredo Junior
acid06 at gmail.com
Thu Mar 2 16:06:29 CET 2006
On 3/2/06, Matt S Trout <dbix-class at trout.me.uk> wrote:
> my @foo = $obj->foo;
> my $x = scalar @foo;
>
> my $y = scalar $obj->foo;
>
> will result in $x and $y not being the same thing, which is horribly
> unintuitive - hence why DBIx::Class::ResultSet objects numify to the number
> of records.
Altough I think that "horribly unintuitive" is an exageration - it is
at most slightly unintuitive - and that I, myself, wouldn't write code
like this (just a matter of programming style, really) this behaviour
seems fine and coherent so it's probably a good thing to numify to the
number of objects.
-Nilson Santos F. Jr.
More information about the Catalyst
mailing list