in reply to Method calling question...
package Base; sub method1 { # Insert code here print "Called from class: ", shift, "\n"; }; package Foo; @ISA = qw(Base); package Bar; @ISA = qw(Base); package main; foreach my $classname qw(Foo Bar) { $classname->method1; } ## Output ## Called from class: Foo Called from class: Bar
MeowChow s aamecha.s a..a\u$&owag.print
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Method calling question...
by satchboost (Scribe) on May 01, 2001 at 02:26 UTC | |
by MeowChow (Vicar) on May 01, 2001 at 02:29 UTC | |
by satchboost (Scribe) on May 01, 2001 at 02:38 UTC |