in reply to Re: My first stab at OO perl...
in thread My first stab at OO perl...

my ($self, $newexp) = @_;

I hate this syntax construction. Absolutely hate it. "Why?" you might ask?

It's because $self isn't passed in to the function by the caller, it's passed in by the system. In my code, I like to differentiate that. This also allows me to go ahead and see my methods vs. any helper functions I might have defined.

sub blah { my $self = shift; my ($other, $vars) = @_; }

You get the expandability as well as the identification that it's a method call, all for the price of a cup of coffee.

------
We are the carpenters and bricklayers of the Information Age.

Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

Replies are listed 'Best First'.
Re: Re2: My first stab at OO perl...
by PhiRatE (Monk) on Jul 17, 2002 at 22:48 UTC
    Fair enough call. I hate your way, but I like it better than 5 lines of = shift :)