satchboost has asked for the wisdom of the Perl Monks concerning the following question:
I've got a base class Foo, which is an Exporter. It has some function foo(), that it exports automatically. (It's some superclass, for example.) I also have Bar which inherits from Foo and Baz which inherits from Bar. So, I have the following:
package Foo; use Exporter; @ISA = qw(Exporter); @EXPORT = qw(foo); sub foo {} package Bar; @ISA = qw(Foo); package Baz; @ISA = qw(Bar);
Now, I want to have foo() be automatically exported into the namespace for Baz the same way it is for Bar. I can't seem to get PERL to do this. Help?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Having Exporter export through @ISA
by merlyn (Sage) on Mar 14, 2001 at 22:22 UTC | |
|
(tye)Re: Having Exporter export through @ISA
by tye (Sage) on Mar 15, 2001 at 03:29 UTC | |
|
Re: Having Exporter export through @ISA
by merlyn (Sage) on Mar 14, 2001 at 22:43 UTC | |
|
Re: Having Exporter export through @ISA
by satchboost (Scribe) on Mar 14, 2001 at 22:23 UTC |