Exporter-Auto

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

Revision history for Perl extension Exporter::Auto

0.04 2014-08-16T18:45:21Z

    - Renamed current SEE ALSO to DEPENDENCIES, and added a SEE ALSO section
      that describes a selection of the other exporter modules.
    - Tweaked abstract
    - Added DESCRIPTION
    - Ignore UNITCHECK and INIT
    - Added github repo to pod

0.03 2013-05-15T13:31:36Z

    - minil release

0.02 2013-02-08T08:18:52

    - doc improvements

lib/Exporter/Auto.pm  view on Meta::CPAN


sub import {
    my $klass = caller(0);

    no strict 'refs';
    unshift @{"${klass}::ISA"}, 'Exporter';

    on_scope_end {
        my %hash = %{"${klass}::"};
        while (my ($k, $v) = each %hash) {
            next if $k =~ /^(?:BEGIN|CHECK|END|INIT|UNITCHECK)$/;
            next if $k =~ /^_/;
            next unless *{"${klass}::${k}"}{CODE};
            next if $klass ne stash_name($klass->can($k));
            push @{"${klass}::EXPORT"}, $k;
        }
    };
}

1;
__END__



( run in 1.115 second using v1.01-cache-2.11-cpan-748bfb374f4 )