in reply to "use base" or @ISA
As an aside, I hate inhererting from Exporter. My class does NOT have an ISA relationship with Exporter! (And inheriting an autoload? ouch!) Below is an alternative.
Instead of:
use vars qw( @ISA @EXPORT_OK %EXPORT_TAGS ); BEGIN { @ISA = qw( Exporter ); @EXPORT_OK = qw( ... ); %EXPORT_TAGS = ( ... ); # if necessary use Exporter; }
try:
use vars qw( @EXPORT_OK %EXPORT_TAGS ); BEGIN { @EXPORT_OK = qw( ... ); %EXPORT_TAGS = ( ... ); # if necessary require Exporter; *import = \&Exporter::import; }
Update: s/module/class/;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: "use base" or @ISA
by kscaldef (Pilgrim) on Aug 17, 2004 at 17:20 UTC | |
by simonm (Vicar) on Aug 18, 2004 at 01:45 UTC | |
by TimToady (Parson) on Aug 18, 2004 at 03:02 UTC | |
by tye (Sage) on Aug 18, 2004 at 03:53 UTC | |
by ikegami (Patriarch) on Aug 17, 2004 at 17:34 UTC | |
|
Re^2: "use base" or @ISA
by Aristotle (Chancellor) on Aug 18, 2004 at 11:34 UTC | |
|
Re^2: "use base" or @ISA
by Prior Nacre V (Hermit) on Aug 19, 2004 at 10:58 UTC |