Re: optional third argument for has_many

[prev] [thread] [next] [Date index for 2004/10/02]

From: David Jack Olrik
Subject: Re: optional third argument for has_many
Date: 06:17 on 02 Oct 2004
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"]

optional third argument for has_many
Y00R0B0T 22:07 on 01 Oct 2004

Re: optional third argument for has_many
David Jack Olrik 06:17 on 02 Oct 2004

Re: optional third argument for has_many
Y00R0B0T 06:59 on 02 Oct 2004

Re: optional third argument for has_many
Tim Bunce 09:29 on 02 Oct 2004

Re: optional third argument for has_many
Simon Cozens 11:14 on 02 Oct 2004

Generated at 11:34 on 01 Dec 2004 by mariachi v0.52