Re: optional third argument for has_many
[prev]
[thread]
[next]
[Date index for 2004/10/02]
On Oct 2, 2004, at 0:07, Y00R0B0T wrote:
> I've seen other code posted on this list looking like this
> __PACKAGE__->has_many(col_id=>'PACKAGE::NAME'=>other_col);
>
> can that call also just be:
> __PACKAGE__->has_many(col_id=>'PACK::NAME', 'other_col'); ?
Yes it can. In perl5 '=>' is just syntactic sugar for ','
So you could also write:
__PACKAGE__->has_many(col_id , 'PACK::NAME' , 'other_col');
--
Best regards,
David Jack Olrik <david@xxxxx.xx> http://david.olrik.dk
GnuPG fingerprint C290 0A4A 0CCC CBA8 2B37 E18D 01D2 F6EF 2E61 9894
["The first rule of Perl club is You do not talk about Perl club"]
|
|
Re: optional third argument for has_many
David Jack Olrik 06:17 on 02 Oct 2004
|