Exporter-Handy
view release on metacpan or search on metacpan
# NAME
Exporter::Handy - An EXPERIMENTAL subclass of <Exporter::Extensible>, which helps create easy-to-extend modules that export symbols
# VERSION
version 1.000004
# SYNOPSIS
Define a module with exports
package My::Utils;
use Exporter::Handy -exporter_setup => 1;
export(qw( foo $x @STUFF -strict_and_warnings ), ':baz' => ['foo'] );
sub foo { ... }
sub strict_and_warnings {
strict->import;
warnings->import;
}
Create a new module which exports all that, and more
package My::MoreUtils;
use My::Utils -exporter_setup => 1;
sub util_fn3 : Export(:baz) { ... }
Use the module
use My::MoreUtils qw( -strict_and_warnings :baz @STUFF );
# Use the exported things
push @STUFF, foo(), util_fn3();
# DESCRIPTION
This module is currently EXPERIMENTAL. You are advised to restrain from using it.
You have been warned.
# FUNCTIONS
## xtags
Build one or more **export tags** suitable for [Exporter::Handy](https://metacpan.org/pod/Exporter%3A%3AHandy), [Exporter::Extensible](https://metacpan.org/pod/Exporter%3A%3AExtensible) and co.
use Exporter::Handy -exporter_setup => 1, xtags;
export(
foo
baz
xtags(
bar => [qw( $bozo @baza boom )],
),
);
# OPTIONS
## strict, warnings, feature, utf8
The below statement:
use Exporter::Handy -strict;
is equivalent to:
use Exporter::Handy;
use strict;
Same thing for "feature", "warnings", "utf8";
## strictures
The below statement:
use Exporter::Handy -strictures;
is equivalent to:
use Exporter::Handy;
use strict;
( run in 1.337 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )