NAME

Export::Declare::Meta - Meta-object to track a packages exports.

DESCRIPTION

This class represents all the export data for an exporter package. It can also inject that data into @EXPORT and similar variables, or into an IMPORTER_MENU() method as consumed by Importer.

SYNOPSYS

my $meta = Export::Declare::Meta->new($package);

$meta->inject_vars;

push @{$meta->export_ok} => qw/foo bar/;

METHODS

$meta = $CLASS->new($pkg)
$meta = $CLASS->new($pkg, menu => 1, vars => 1, default => 1)

Get (or create) an instance for the specified $pkg. If menu => 1 is used as an argument then IMPORTER_MENU() will be injected. If vars => 1 is used then @EXPORT and similar vars will be set. If default => 1 is used then package cars will be injected, unless vars or menu have already been injected.

$menta->inject_menu

This will inject the IMPORTER_MENU() function.

$menta->inject_vars

This will associate @EXPORT and friends with the meta-data.

$bool = $menta->vars

Check if vars have been injected.

$bool = $menta->menu

Check if IMPORTER_MENU() has been injected.

$pkg = $menta->package

Get the package associated with the instance.

$arrayref = $menta->export

Get the arrayref listing DEFAULT exports.

$arrayref = $menta->export_ok

Get the arrayref listing ALL exports.

$arrayref = $menta->export_fail

Get the arrayref listing exports that may fail.

$hashref = $menta->export_tags

Get the hashref with all the tags.

$hashref = $menta->export_anon

Get the hashref with anonymous exports.

$hashref = $menta->export_gen

Get the hashref with generated exports.

$hashref = $menta->export_magic

Get the hashref with export magic.

SOURCE

The source code repository for Export-Declare can be found at http://github.com/exodist/Export-Declare/.

MAINTAINERS

Chad Granum <exodist@cpan.org>

AUTHORS

Chad Granum <exodist@cpan.org>

COPYRIGHT

Copyright 2015 Chad Granum <exodist7@gmail.com>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See http://dev.perl.org/licenses/