in reply to Re^2: Library file or module for sharing code?
in thread Library file or module for sharing code?
The only important part that was missing was
@ISA= qw(Exporter);
But a better approach would be either:
*import= \&Exporter::import;
or, if you know you'll have a new enough version of Perl
use Exporter qw(import);
Because using inheritance to get a single method is a bad idea; it brings along too much unhelpful baggage.
- tye
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Library file or module for sharing code? (import)
by bradcathey (Prior) on Dec 28, 2005 at 16:22 UTC | |
by tye (Sage) on Dec 28, 2005 at 17:40 UTC |