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)
-
Get (or create) an instance for the specified
$pkg
. Ifmenu => 1
is used as an argument thenIMPORTER_MENU()
will be injected. Ifvars => 1
is used then@EXPORT
and similar vars will be set. Ifdefault => 1
is used then package cars will be injected, unless vars or menu have already been injected. -
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.
-
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.
-
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
AUTHORS
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/