.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
. ds -- \(*W-
. ds PI pi
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
. ds L" ""
. ds R" ""
. ds C` ""
. ds C' ""
'br\}
.el\{\
. ds -- \|\(em\|
. ds PI \(*p
. ds L" ``
. ds R" ''
. ds C`
. ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\"
.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{\
. if \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. if !\nF==2 \{\
. nr % 0
. nr F 2
. \}
. \}
.\}
.rr rF
.\" ========================================================================
.\"
.IX Title "Exporter::Tiny::Manual::Etc 3"
.TH Exporter::Tiny::Manual::Etc 3 "2020-04-24" "perl v5.26.3" "User Contributed Perl Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
Exporter::Tiny::Manual::Etc \- odds and ends
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
.SS "Utility Functions"
.IX Subsection "Utility Functions"
Exporter::Tiny is itself an exporter!
.PP
These functions are really for internal use, but can be exported if you
need them:
.ie n .IP """mkopt(\e@array)""" 4
.el .IP "\f(CWmkopt(\e@array)\fR" 4
.IX Item "mkopt(@array)"
Similar to \f(CW\*(C`mkopt\*(C'\fR from Data::OptList. It doesn't support all the
fancy options that Data::OptList does (\f(CW\*(C`moniker\*(C'\fR, \f(CW\*(C`require_unique\*(C'\fR,
\&\f(CW\*(C`must_be\*(C'\fR and \f(CW\*(C`name_test\*(C'\fR) but runs about 50% faster.
.ie n .IP """mkopt_hash(\e@array)""" 4
.el .IP "\f(CWmkopt_hash(\e@array)\fR" 4
.IX Item "mkopt_hash(@array)"
Similar to \f(CW\*(C`mkopt_hash\*(C'\fR from Data::OptList. See also \f(CW\*(C`mkopt\*(C'\fR.
.SS "History"
.IX Subsection "History"
Type::Library had a bunch of custom exporting code which poked coderefs
into its caller's stash. It needed this to be something more powerful than
most exporters so that it could switch between exporting Moose, Mouse and
Moo-compatible objects on request. Sub::Exporter would have been capable,
but had too many dependencies for the Type::Tiny project.
.PP
Meanwhile Type::Utils, Types::TypeTiny and Test::TypeTiny each
used the venerable Exporter.pm. However, this meant they were
unable to use the features like Sub::Exporter\-style function renaming
which I'd built into Type::Library:
.PP
.Vb 2
\& ## import "Str" but rename it to "String".
\& use Types::Standard "Str" => { \-as => "String" };
.Ve
.PP
And so I decided to factor out code that could be shared by all Type-Tiny's
exporters into a single place: Exporter::TypeTiny.
.PP
As of version 0.026, Exporter::TypeTiny was also made available as
Exporter::Tiny, distributed independently on \s-1CPAN. CHOCOLATEBOY\s0 had
convinced me that it was mature enough to live a life of its own.
.PP
As of version 0.030, Type-Tiny depends on Exporter::Tiny and
Exporter::TypeTiny is being phased out.
.SS "Obligatory Exporter Comparison"
.IX Subsection "Obligatory Exporter Comparison"
Exporting is unlikely to be your application's performance bottleneck, but
nonetheless here are some comparisons.
.PP
\&\fBComparative sizes according to Devel::SizeMe:\fR
.PP
.Vb 6
\& Exporter 217.1Kb
\& Sub::Exporter::Progressive 263.2Kb
\& Exporter::Tiny 267.7Kb
\& Exporter + Exporter::Heavy 281.5Kb
\& Exporter::Renaming 406.2Kb
\& Sub::Exporter 701.0Kb
.Ve
.PP
\&\fBPerformance exporting a single sub:\fR
.PP
.Vb 5
\& Rate SubExp ExpTiny SubExpProg ExpPM
\&SubExp 2489/s \-\- \-56% \-85% \-88%
\&ExpTiny 5635/s 126% \-\- \-67% \-72%
\&SubExpProg 16905/s 579% 200% \-\- \-16%
\&ExpPM 20097/s 707% 257% 19% \-\-
.Ve
.PP
(Exporter::Renaming globally changes the behaviour of Exporter.pm, so could
not be included in the same benchmarks.)
.PP
\&\fB(Non-Core) Dependencies:\fR
.PP
.Vb 5
\& Exporter \-1
\& Exporter::Renaming 0
\& Exporter::Tiny 0
\& Sub::Exporter::Progressive 0
\& Sub::Exporter 3
.Ve
.PP
\&\fBFeatures:\fR
.PP
.Vb 10
\& ExpPM ExpTiny SubExp SubExpProg
\& Can export code symbols............. Yes Yes Yes Yes
\& Can export non\-code symbols......... Yes Yes
\& Groups/tags......................... Yes Yes Yes Yes
\& Export by regexp.................... Yes Yes
\& Bang prefix......................... Yes Yes
\& Allows renaming of subs............. Yes Yes Maybe
\& Install code into scalar refs....... Yes Yes Maybe
\& Can be passed an "into" parameter... Yes Yes Maybe
\& Can be passed an "installer" sub.... Yes Yes Maybe
\& Config avoids package variables..... Yes
\& Supports generators................. Yes Yes
\& Sane API for generators............. Yes Yes
\& Unimport............................ Yes
.Ve
.PP
(Certain Sub::Exporter::Progressive features are only available if
Sub::Exporter is installed.)
.SH "SEE ALSO"
.IX Header "SEE ALSO"
Exporter::Shiny,
Exporter::Tiny.
.SH "AUTHOR"
.IX Header "AUTHOR"
Toby Inkster <tobyink@cpan.org>.
.SH "COPYRIGHT AND LICENCE"
.IX Header "COPYRIGHT AND LICENCE"
This software is copyright (c) 2013\-2014, 2017 by Toby Inkster.
.PP
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
.SH "DISCLAIMER OF WARRANTIES"
.IX Header "DISCLAIMER OF WARRANTIES"
\&\s-1THIS PACKAGE IS PROVIDED \*(L"AS IS\*(R" AND WITHOUT ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.\s0