[Catalyst] Re: retrieving multiple values from forms
    Peter Karman 
    peter at peknet.com
       
    Tue Dec 18 14:25:55 GMT 2007
    
    
  
On 12/17/2007 05:27 PM, A. Pagaltzis wrote:
> The sane thing is to have *TWO* methods, one that *always*
> returns a scalar, and one that *always* returns a list. (Or
> rather, an arrayref, because if it’s just a list, it is easy to
> improperly treat it like a scalar, whereas if it’s an arrayref
> it’s impossible to forget to unpack the array when you meant to
> do that.)
> 
I did something similar in my last $job, where I just had a begin() block in my Root.pm
that reset params->{foo} to always return an arrayref.
-- 
Peter Karman  .  peter at peknet.com  .  http://peknet.com/
    
    
More information about the Catalyst
mailing list