Base.pm: package Base; sub method1 { # Insert code here }; Foo.pm: package Foo; use Base; @ISA = qw(Base); Bar.pm: package Bar; use Base; @ISA = qw(Base); Main.pm ... foreach my $classname qw(Foo Bar) { $classname->method1; }
I know that this code doesn't work. What I'm wondering is what will work for what I'm trying to do?
In reply to Method calling question... by satchboost
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |