Exporter-Dispatch
view release on metacpan or search on metacpan
lib/Exporter/Dispatch.pm view on Meta::CPAN
package Exporter::Dispatch;
use Carp qw(croak);
our $VERSION = 2.10;
sub import {
my $pkg = (caller)[0];
if (@_ > 2) {
croak 'Incorrect import list for Exporter::Dispatch';
}
elsif ($_[-1] eq 'create_dptable') {
*{"${pkg}::create_dptable"} = \&create_dptable;
return
}
elsif ($_[-1] eq 'dptable_alias') {
*{"${pkg}::dptable_alias"} = sub {
*{"${pkg}::$_[1]"} = *{"${pkg}::$_[0]"}
( run in 1.032 second using v1.01-cache-2.11-cpan-1e74a51a04c )