in reply to Re: Re: Calling SUPER in MethodMaker-generated methods
in thread Calling SUPER in MethodMaker-generated methods
In the constructor (new), @_ is shifted into $class. This is the name of the package, in this case Trivial.package Trivial; sub new { my $class = shift @_; ... return bless $self, $class; } sub some_method { my $self = shift @_; ... } ... # in your program that uses Trivial: my $instance = Trivial->new(..); my $instance->some_method(..);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Calling SUPER in MethodMaker-generated methods
by danb (Friar) on Jul 08, 2003 at 20:11 UTC |