Re: new vs ->new

2007-06-11 Thread Dr.Ruud
Paul Lalli schreef: > Dr.Ruud: >> Adriano Ferreira: >>> Definitely go with >>> my $test = Some::Module->new; >> >> or even with: >>my $test = Some::Module::->new(); > > For the love of $DEITY, why? If you use A::B::->new(); you'll get a compile time check on whether module A::B is loaded a

Re: new vs ->new

2007-06-11 Thread Adriano Ferreira
On 6/11/07, Robert Hicks <[EMAIL PROTECTED]> wrote: Dr.Ruud wrote: > "Adriano Ferreira" schreef: > >> Definitely go with >> my $test = Some::Module->new; > > or even with: >my $test = Some::Module::->new(); > While I am sure that will work...I have never seen it with parens after the new.

Re: new vs ->new

2007-06-11 Thread Robert Hicks
Dr.Ruud wrote: "Adriano Ferreira" schreef: Definitely go with my $test = Some::Module->new; or even with: my $test = Some::Module::->new(); While I am sure that will work...I have never seen it with parens after the new. Robert -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additio

Re: new vs ->new

2007-06-10 Thread Paul Lalli
On Jun 10, 7:12 pm, [EMAIL PROTECTED] (Dr.Ruud) wrote: > "Adriano Ferreira" schreef: > > > Definitely go with > > my $test = Some::Module->new; > > or even with: >my $test = Some::Module::->new(); For the love of $DEITY, why? Paul Lalli -- To unsubscribe, e-mail: [EMAIL PROTECTED] For ad

Re: new vs ->new

2007-06-10 Thread Dr.Ruud
"Adriano Ferreira" schreef: > Definitely go with > my $test = Some::Module->new; or even with: my $test = Some::Module::->new(); -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: new vs ->new

2007-06-08 Thread Robert Hicks
Chas Owens wrote: > On 6/8/07, Robert Hicks <[EMAIL PROTECTED]> wrote: >> I see some modules that call "new" like: >> >> my $test = new Some::Module; >> >> and some like: >> >> my $test = Some::Module->new; >> >> Is there a difference and what is the "recommended" way? >> >> Robert > > "new Object

Re: new vs ->new

2007-06-08 Thread Adriano Ferreira
On 6/8/07, Robert Hicks <[EMAIL PROTECTED]> wrote: I see some modules that call "new" like: my $test = new Some::Module; and some like: my $test = Some::Module->new; Is there a difference and what is the "recommended" way? Definitely go with my $test = Some::Module->new; The indirect obje

Re: new vs ->new

2007-06-08 Thread Chas Owens
On 6/8/07, Robert Hicks <[EMAIL PROTECTED]> wrote: I see some modules that call "new" like: my $test = new Some::Module; and some like: my $test = Some::Module->new; Is there a difference and what is the "recommended" way? Robert "new Object" uses indirect invocation*. Some people feel it