Re: function calling and object calling

2009-08-11 Thread Uri Guttman
> "JG" == Jenn G writes: JG> On Tue, Aug 11, 2009 at 2:33 PM, Uri Guttman wrote: >>> "JG" == Jenn G writes: >> >>  JG> When I create a package, and call its methods by both object way and >>  JG> function (exported) way, how to avoid the conflict in arguments >>  JG> passing

Re: function calling and object calling

2009-08-11 Thread Chas. Owens
On Tue, Aug 11, 2009 at 05:45, Jenn G. wrote: > On Tue, Aug 11, 2009 at 2:33 PM, Uri Guttman wrote: >>> "JG" == Jenn G writes: >> >>  JG> When I create a package, and call its methods by both object way and >>  JG> function (exported) way, how to avoid the conflict in arguments >>  JG> passing

Re: function calling and object calling

2009-08-11 Thread Jenn G.
On Tue, Aug 11, 2009 at 2:33 PM, Uri Guttman wrote: >> "JG" == Jenn G writes: > >  JG> When I create a package, and call its methods by both object way and >  JG> function (exported) way, how to avoid the conflict in arguments >  JG> passing? > > why are you trying to do OO and procedural call

Re: function calling and object calling

2009-08-10 Thread Chas. Owens
On Tue, Aug 11, 2009 at 02:14, Jenn G. wrote: > Hello, > > When I create a package, and call its methods by both object way and > function (exported) way, how to avoid the conflict in arguments > passing? snip Short answer: don't do that. Medium answer: Mixing procedural and OO style in the same

Re: function calling and object calling

2009-08-10 Thread Uri Guttman
my $self = shift; JG> my @arg = @_; my( $self, @args ) = @_ ; that is cleaner, faster and better. JG> ... JG> } JG> __END__ JG> But for function calling, "my $self = shift;" shouldn't be used. JG> So how to make both function calli

function calling and object calling

2009-08-10 Thread Jenn G.
{ my $self = shift; my @arg = @_; ... } __END__ But for function calling, "my $self = shift;" shouldn't be used. So how to make both function calling and object calling work together? Thanks. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional c