Export::Declare::Meta - Meta-object to track a packages exports.
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.
@EXPORT
IMPORTER_MENU()
my $meta = Export::Declare::Meta->new($package); $meta->inject_vars; push @{$meta->export_ok} => qw/foo bar/;
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.
$pkg
menu => 1
vars => 1
default => 1
This will inject the IMPORTER_MENU() function.
This will associate @EXPORT and friends with the meta-data.
Check if vars have been injected.
Check if IMPORTER_MENU() has been injected.
Get the package associated with the instance.
Get the arrayref listing DEFAULT exports.
Get the arrayref listing ALL exports.
Get the arrayref listing exports that may fail.
Get the hashref with all the tags.
Get the hashref with anonymous exports.
Get the hashref with generated exports.
Get the hashref with export magic.
The source code repository for Export-Declare can be found at http://github.com/exodist/Export-Declare/.
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/
To install Export::Declare, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Export::Declare
CPAN shell
perl -MCPAN -e shell install Export::Declare
For more information on module installation, please visit the detailed CPAN module installation guide.