Next | The Perl Hardware Store | DC.pm Version | 20 |
You don't need Exporter to export.
If you want the simple features, it's easy to do it yourself.
package Rings; use Carp 'croak';
my @EXPORTS = qw(narya nenya vilya);
my %EXPORTED = map {$_ => 1} @EXPORTS;
sub import { my $pack = shift; my $caller = caller;
foreach $func (@_) { croak "`$func' not exported" unless $EXPORTED{$func}; *{$caller . '::' . $func} = \&$func; } }
As you can see, we didn't need 476 lines here.
Next | Copyright © 2003 M. J. Dominus |