Sub::Exporter::Progressive - Only use Sub::Exporter if you need it
package Syntax::Keyword::Gather; use Sub::Exporter::Progressive -setup => { exports => [qw( break gather gathered take )], groups => { defaults => [qw( break gather gathered take )], }, }; # elsewhere # uses Exporter for speed use Syntax::Keyword::Gather; # somewhere else # uses Sub::Exporter for features use Syntax::Keyword::Gather 'gather', take => { -as => 'grab' };
Sub::Exporter is an incredibly powerful module, but with that power comes great responsibility, er- as well as some runtime penalties. This module is a Sub::Exporter wrapper that will let your users just use Exporter if all they are doing is picking exports, but use Sub::Exporter if your users try to use Sub::Exporter's more advanced features features, like renaming exports, if they try to use them.
Sub::Exporter
Note that this module will export @EXPORT, @EXPORT_OK and %EXPORT_TAGS package variables for Exporter to work. Additionally, if your package uses advanced Sub::Exporter features like currying, this module will only ever use Sub::Exporter, so you might as well use it directly.
@EXPORT
@EXPORT_OK
%EXPORT_TAGS
Exporter
frew - Arthur Axel Schmidt (cpan:FREW) <frioux+cpan@gmail.com>
ilmari - Dagfinn Ilmari Mannsåker (cpan:ILMARI) <ilmari@ilmari.org>
mst - Matt S. Trout (cpan:MSTROUT) <mst@shadowcat.co.uk>
leont - Leon Timmermans (cpan:LEONT) <leont@cpan.org>
Copyright (c) 2012 the Sub::Exporter::Progressive "AUTHOR" and "CONTRIBUTORS" as listed above.
This library is free software and may be distributed under the same terms as perl itself.
To install Sub::Exporter::Progressive, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Sub::Exporter::Progressive
CPAN shell
perl -MCPAN -e shell install Sub::Exporter::Progressive
For more information on module installation, please visit the detailed CPAN module installation guide.