Re: [Catalyst] Re: retrieving multiple values from forms

2007-12-20 Thread Сергей Мартынов
i dare say that's not what i'd suggested. i wrote: my @titles = ref $c-request-params-{title} ? @{ $c-request-params-{title} } : ($c-request-params-{title} || ''); the @{ ... } bit was not extraneous. (on the other hand, if there's a more idiomatic way of doing

Re: [Catalyst] Re: retrieving multiple values from forms

2007-12-19 Thread Сергей Мартынов
i dare say that's not what i'd suggested. i wrote: my @titles = ref $c-request-params-{title} ? @{ $c-request-params-{title} } : ($c-request-params-{title} || ''); the @{ ... } bit was not extraneous. (on the other hand, if there's a more idiomatic way of doing this i'd love to hear

Re: [Catalyst] Re: retrieving multiple values from forms

2007-12-19 Thread Carl Franks
On 20/12/2007, Сергей Мартынов [EMAIL PROTECTED] wrote: i dare say that's not what i'd suggested. i wrote: my @titles = ref $c-request-params-{title} ? @{ $c-request-params-{title} } : ($c-request-params-{title} || ''); the @{ ... } bit was not extraneous. (on the other

Re: [Catalyst] Re: retrieving multiple values from forms

2007-12-18 Thread Peter Karman
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

Re: [Catalyst] Re: retrieving multiple values from forms

2007-12-18 Thread jagdish eashwar
On Dec 18, 2007 6:56 AM, Andrew Rodland [EMAIL PROTECTED] wrote: On Monday 17 December 2007 05:27:46 pm A. Pagaltzis wrote: The *sane* thing is neither. The sane thing is to have *TWO* methods, one that *always* returns a scalar, and one that *always* returns a list. (Or rather, an

[Catalyst] Re: retrieving multiple values from forms

2007-12-18 Thread kevin montuori
je == jagdish eashwar [EMAIL PROTECTED] writes: So I changed the code to read @role_id = $c-req-params(role_id) as Kevin suggested and put [EMAIL PROTECTED] in the stash. Now there was no error, but I got ARRAY(0x987e5e0) in the template instead of the role_id values. i dare say that's

Re: [Catalyst] Re: retrieving multiple values from forms

2007-12-18 Thread Matt S Trout
On Mon, Dec 17, 2007 at 07:26:53PM -0600, Andrew Rodland wrote: On Monday 17 December 2007 05:27:46 pm A. Pagaltzis wrote: The *sane* thing is neither. The sane thing is to have *TWO* methods, one that *always* returns a scalar, and one that *always* returns a list. (Or rather, an

[Catalyst] Re: retrieving multiple values from forms

2007-12-17 Thread A. Pagaltzis
* Andrew Rodland [EMAIL PROTECTED] [2007-12-17 22:40]: On Monday 17 December 2007 03:01:53 pm Matt S Trout wrote: On Sat, Dec 15, 2007 at 01:10:52PM -0600, Andrew Rodland wrote: See the perldoc for Catalyst::Request -- the 'param' method comes in handy here. @values =

Re: [Catalyst] Re: retrieving multiple values from forms

2007-12-17 Thread Andrew Rodland
On Monday 17 December 2007 05:27:46 pm A. Pagaltzis wrote: The *sane* thing is neither. 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