in reply to OO perl query

When you're writing object-oriented classes, the easiest thing to do is make everything a method, whether it strictly needs to be or not. Then you always have a $self, and you can always use it to call other methods.

Replies are listed 'Best First'.
Re^2: OO perl query
by Limbic~Region (Chancellor) on Nov 03, 2005 at 14:24 UTC
    friedo,
    I agree when we are talking about calling methods within methods internal to a class. It is not too uncommon though to want to provide non-OO functionality to modules (see CGI for instance). Perl doesn't natively support multi-method dispatch so we have to devise our own solution* in these cases. One way is to examine the parameters yourself and behave accordingly.

    Cheers - L~R

    * There are of course modules that can make this easier but they are still not core functionality. Perl6 will correct this deficiency.