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,
Exporter::Extensible 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; use warnings;
sane
The below statement:
use Exporter::Handy -sane;
is equivalent to: use Exporter::Handy; use strict; use warnings;
( run in 0.860 second using v1.01-cache-2.11-cpan-99c4e6809bf )