[Catalyst] html-widget bug or design?

A. Pagaltzis pagaltzis at gmx.de
Wed Mar 1 20:49:41 CET 2006


* Nilson Santos Figueiredo Junior <acid06 at gmail.com> [2006-03-01 19:20]:
>On 3/1/06, A. Pagaltzis <pagaltzis at gmx.de> wrote:
>> Please don't. Every time I have to use such an API it makes me
>> cry. :-( Making the type of the return value dependent on its
>> value is a breathtaking pain in the rear end. It causes code
>> that's gunked up with gobs of `ref $foo eq 'ARRAY'` checks.
>
>I'm not sure when you'd need to actually check anything like
>that.
>
>If you want an array ref call it like:
>
>my $result = Class->method;

Except Carl’s suggestion was that this would sometimes return a
value, not an array ref; depending on whether there’s only one
value or several.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>



More information about the Catalyst mailing list