403Webshell
Server IP : 103.119.228.120  /  Your IP : 3.128.200.165
Web Server : Apache
System : Linux v8.techscape8.com 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64
User : nobody ( 99)
PHP Version : 5.6.40
Disable Function : shell_exec,symlink,system,exec,proc_get_status,proc_nice,proc_terminate,define_syslog_variables,syslog,openlog,closelog,escapeshellcmd,passthru,ocinum cols,ini_alter,leak,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dl,dll,myshellexec,proc_open,socket_bind,proc_close,escapeshellarg,parse_ini_filepopen,fpassthru,exec,passthru,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,popen,show_source,proc_nice,proc_terminate,proc_get_status,proc_close,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,dl,symlink,shell_exec,system,dl,passthru,escapeshellarg,escapeshellcmd,myshellexec,c99_buff_prepare,c99_sess_put,fpassthru,getdisfunc,fx29exec,fx29exec2,is_windows,disp_freespace,fx29sh_getupdate,fx29_buff_prepare,fx29_sess_put,fx29shexit,fx29fsearch,fx29ftpbrutecheck,fx29sh_tools,fx29sh_about,milw0rm,imagez,sh_name,myshellexec,checkproxyhost,dosyayicek,c99_buff_prepare,c99_sess_put,c99getsource,c99sh_getupdate,c99fsearch,c99shexit,view_perms,posix_getpwuid,posix_getgrgid,posix_kill,parse_perms,parsesort,view_perms_color,set_encoder_input,ls_setcheckboxall,ls_reverse_all,rsg_read,rsg_glob,selfURL,dispsecinfo,unix2DosTime,addFile,system,get_users,view_size,DirFiles,DirFilesWide,DirPrintHTMLHeaders,GetFilesTotal,GetTitles,GetTimeTotal,GetMatchesCount,GetFileMatchesCount,GetResultFiles,fs_copy_dir,fs_copy_obj,fs_move_dir,fs_move_obj,fs_rmdir,SearchText,getmicrotime
MySQL : ON |  cURL : ON |  WGET : ON |  Perl : ON |  Python : ON |  Sudo : ON |  Pkexec : ON
Directory :  /usr/local/ssl/local/ssl/local/ssl/local/ssl/local/ssl/local/share/man/man3/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /usr/local/ssl/local/ssl/local/ssl/local/ssl/local/ssl/local/share/man/man3/Exporter::Tiny.3pm
.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28)
.\"
.\" 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 turned on, 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
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
.    \" fudge factors for nroff and troff
.if n \{\
.    ds #H 0
.    ds #V .8m
.    ds #F .3m
.    ds #[ \f1
.    ds #] \fP
.\}
.if t \{\
.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
.    ds #V .6m
.    ds #F 0
.    ds #[ \&
.    ds #] \&
.\}
.    \" simple accents for nroff and troff
.if n \{\
.    ds ' \&
.    ds ` \&
.    ds ^ \&
.    ds , \&
.    ds ~ ~
.    ds /
.\}
.if t \{\
.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
.    \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
.    \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
.    \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
.    ds : e
.    ds 8 ss
.    ds o a
.    ds d- d\h'-1'\(ga
.    ds D- D\h'-1'\(hy
.    ds th \o'bp'
.    ds Th \o'LP'
.    ds ae ae
.    ds Ae AE
.\}
.rm #[ #] #H #V #F C
.\" ========================================================================
.\"
.IX Title "Exporter::Tiny 3"
.TH Exporter::Tiny 3 "2014-10-05" "perl v5.16.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 \- an exporter with the features of Sub::Exporter but only core dependencies
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
.Vb 5
\&   package MyUtils;
\&   use base "Exporter::Tiny";
\&   our @EXPORT = qw(frobnicate);
\&   sub frobnicate { my $n = shift; ... }
\&   1;
\&
\&   package MyScript;
\&   use MyUtils "frobnicate" => { \-as => "frob" };
\&   print frob(42);
\&   exit;
.Ve
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
Exporter::Tiny supports many of Sub::Exporter's external-facing features
including renaming imported functions with the \f(CW\*(C`\-as\*(C'\fR, \f(CW\*(C`\-prefix\*(C'\fR and
\&\f(CW\*(C`\-suffix\*(C'\fR options; explicit destinations with the \f(CW\*(C`into\*(C'\fR option;
and alternative installers with the \f(CW\*(C`installler\*(C'\fR option. But it's written
in only about 40% as many lines of code and with zero non-core dependencies.
.PP
Its internal-facing interface is closer to Exporter.pm, with configuration
done through the \f(CW@EXPORT\fR, \f(CW@EXPORT_OK\fR and \f(CW%EXPORT_TAGS\fR
package variables.
.PP
Exporter::Tiny performs most of its internal duties (including resolution
of tag names to sub names, resolution of sub names to coderefs, and
installation of coderefs into the target package) as method calls, which
means they can be overridden to provide interesting behaviour.
.SS "Utility Functions"
.IX Subsection "Utility Functions"
These 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.
.SH "TIPS AND TRICKS IMPORTING FROM EXPORTER::TINY"
.IX Header "TIPS AND TRICKS IMPORTING FROM EXPORTER::TINY"
For the purposes of this discussion we'll assume we have a module called
\&\f(CW\*(C`MyUtils\*(C'\fR which exports one function, \f(CW\*(C`frobnicate\*(C'\fR. \f(CW\*(C`MyUtils\*(C'\fR
inherits from Exporter::Tiny.
.PP
Many of these tricks may seem familiar from Sub::Exporter. That is
intentional. Exporter::Tiny doesn't attempt to provide every feature of
Sub::Exporter, but where it does it usually uses a fairly similar \s-1API.\s0
.SS "Basic importing"
.IX Subsection "Basic importing"
.Vb 2
\&   # import "frobnicate" function
\&   use MyUtils "frobnicate";
\&
\&   # import all functions that MyUtils offers
\&   use MyUtils \-all;
.Ve
.SS "Renaming imported functions"
.IX Subsection "Renaming imported functions"
.Vb 2
\&   # call it "frob"
\&   use MyUtils "frobnicate" => { \-as => "frob" };
\&
\&   # call it "my_frobnicate"
\&   use MyUtils "frobnicate" => { \-prefix => "my_" };
\&
\&   # can set a prefix for *all* functions imported from MyUtils
\&   # by placing the options hashref *first*.
\&   use MyUtils { prefix => "my_" }, "frobnicate";
\&   # (note the lack of hyphen before \`prefix\`.)
\&
\&   # call it "frobnicate_util"
\&   use MyUtils "frobnicate" => { \-suffix => "_util" };
\&   use MyUtils { suffix => "_util" }, "frobnicate";
\&
\&   # import it twice with two different names
\&   use MyUtils
\&      "frobnicate" => { \-as => "frob" },
\&      "frobnicate" => { \-as => "frbnct" };
.Ve
.SS "Lexical subs"
.IX Subsection "Lexical subs"
.Vb 3
\&   {
\&      use Sub::Exporter::Lexical lexical_installer => { \-as => "lex" };
\&      use MyUtils { installer => lex }, "frobnicate";
\&      
\&      frobnicate(...);  # ok
\&   }
\&   
\&   frobnicate(...);  # not ok
.Ve
.SS "Import functions into another package"
.IX Subsection "Import functions into another package"
.Vb 1
\&   use MyUtils { into => "OtherPkg" }, "frobnicate";
\&   
\&   OtherPkg::frobincate(...);
.Ve
.SS "Import functions into a scalar"
.IX Subsection "Import functions into a scalar"
.Vb 2
\&   my $func;
\&   use MyUtils "frobnicate" => { \-as => \e$func };
\&   
\&   $func\->(...);
.Ve
.SS "Import functions into a hash"
.IX Subsection "Import functions into a hash"
\&\s-1OK,\s0 Sub::Exporter doesn't do this...
.PP
.Vb 2
\&   my %funcs;
\&   use MyUtils { into => \e%funcs }, "frobnicate";
\&   
\&   $funcs{frobnicate}\->(...);
.Ve
.SS "\s-1DO NOT WANT\s0!"
.IX Subsection "DO NOT WANT!"
This imports everything except \*(L"frobnicate\*(R":
.PP
.Vb 1
\&   use MyUtils qw( \-all !frobnicate );
.Ve
.PP
Negated imports always \*(L"win\*(R", so the following will not import
\&\*(L"frobnicate\*(R", no matter how many times you repeat it...
.PP
.Vb 1
\&   use MyUtils qw( !frobnicate frobnicate frobnicate frobnicate );
.Ve
.SS "Importing by regexp"
.IX Subsection "Importing by regexp"
Here's how you could import all functions beginning with an \*(L"f\*(R":
.PP
.Vb 1
\&   use MyUtils qw( /^F/i );
.Ve
.PP
Or import everything except functions beginning with a \*(L"z\*(R":
.PP
.Vb 1
\&   use MyUtils qw( \-all !/^Z/i );
.Ve
.PP
Note that regexps are always supplied as \fIstrings\fR starting with
\&\f(CW"/"\fR, and not as quoted regexp references (\f(CW\*(C`qr/.../\*(C'\fR).
.SS "Unimporting"
.IX Subsection "Unimporting"
You can unimport the functions that MyUtils added to your namespace:
.PP
.Vb 1
\&   no MyUtils;
.Ve
.PP
Or just specific ones:
.PP
.Vb 1
\&   no MyUtils qw(frobnicate);
.Ve
.PP
If you renamed a function when you imported it, you should unimport by
the new name:
.PP
.Vb 3
\&   use MyUtils frobnicate => { \-as => "frob" };
\&   ...;
\&   no MyUtils "frob";
.Ve
.PP
Unimporting using tags and regexps should mostly do what you want.
.SH "TIPS AND TRICKS EXPORTING USING EXPORTER::TINY"
.IX Header "TIPS AND TRICKS EXPORTING USING EXPORTER::TINY"
Simple configuration works the same as Exporter; inherit from this module,
and use the \f(CW@EXPORT\fR, \f(CW@EXPORT_OK\fR and \f(CW%EXPORT_TAGS\fR
package variables to list subs to export.
.SS "Generators"
.IX Subsection "Generators"
Exporter::Tiny has always allowed exported subs to be generated (like
Sub::Exporter), but until version 0.025 did not have an especially nice
\&\s-1API\s0 for it.
.PP
Now, it's easy. If you want to generate a sub \f(CW\*(C`foo\*(C'\fR to export, list it in
\&\f(CW@EXPORT\fR or \f(CW@EXPORT_OK\fR as usual, and then simply give your
exporter module a class method called \f(CW\*(C`_generate_foo\*(C'\fR.
.PP
.Vb 1
\&   push @EXPORT_OK, \*(Aqfoo\*(Aq;
\&   
\&   sub _generate_foo {
\&      my $class = shift;
\&      my ($name, $args, $globals) = @_;
\&      
\&      return sub {
\&         ...;
\&      }
\&   }
.Ve
.PP
You can also generate tags:
.PP
.Vb 5
\&   my %constants;
\&   BEGIN {
\&      %constants = (FOO => 1, BAR => 2);
\&   }
\&   use constant \e%constants;
\&   
\&   $EXPORT_TAGS{constants} = sub {
\&      my $class = shift;
\&      my ($name, $args, $globals) = @_;
\&      
\&      return keys(%constants);
\&   };
.Ve
.SS "Overriding Internals"
.IX Subsection "Overriding Internals"
An important difference between Exporter and Exporter::Tiny is that
the latter calls all its internal functions as \fIclass methods\fR. This
means that your subclass can \fIoverride them\fR to alter their behaviour.
.PP
The following methods are available to be overridden. Despite being named
with a leading underscore, they are considered public methods. (The underscore
is there to avoid accidentally colliding with any of your own function names.)
.ie n .IP """_exporter_validate_opts($globals)""" 4
.el .IP "\f(CW_exporter_validate_opts($globals)\fR" 4
.IX Item "_exporter_validate_opts($globals)"
This method is called once each time \f(CW\*(C`import\*(C'\fR is called. It is passed a
reference to the global options hash. (That is, the optional leading hashref
in the \f(CW\*(C`use\*(C'\fR statement, where the \f(CW\*(C`into\*(C'\fR and \f(CW\*(C`installer\*(C'\fR options can be
provided.)
.Sp
You may use this method to munge the global options, or validate them,
throwing an exception or printing a warning.
.Sp
The default implementation does nothing interesting.
.ie n .IP """_exporter_validate_unimport_opts($globals)""" 4
.el .IP "\f(CW_exporter_validate_unimport_opts($globals)\fR" 4
.IX Item "_exporter_validate_unimport_opts($globals)"
Like \f(CW\*(C`_exporter_validate_opts\*(C'\fR, but called for \f(CW\*(C`unimport\*(C'\fR.
.ie n .IP """_exporter_merge_opts($tag_opts, $globals, @exports)""" 4
.el .IP "\f(CW_exporter_merge_opts($tag_opts, $globals, @exports)\fR" 4
.IX Item "_exporter_merge_opts($tag_opts, $globals, @exports)"
Called to merge options which have been provided for a tag into the
options provided for the exports that the tag expanded to.
.ie n .IP """_exporter_expand_tag($name, $args, $globals)""" 4
.el .IP "\f(CW_exporter_expand_tag($name, $args, $globals)\fR" 4
.IX Item "_exporter_expand_tag($name, $args, $globals)"
This method is called to expand an import tag (e.g. \f(CW":constants"\fR).
It is passed the tag name (minus the leading \*(L":\*(R"), an optional hashref
of options (like \f(CW\*(C`{ \-prefix => "foo_" }\*(C'\fR), and the global options
hashref.
.Sp
It is expected to return a list of ($name, \f(CW$args\fR) arrayref pairs. These
names can be sub names to export, or further tag names (which must have
their \*(L":\*(R"). If returning tag names, be careful to avoid creating a tag
expansion loop!
.Sp
The default implementation uses \f(CW%EXPORT_TAGS\fR to expand tags, and
provides fallbacks for the \f(CW\*(C`:default\*(C'\fR and \f(CW\*(C`:all\*(C'\fR tags.
.ie n .IP """_exporter_expand_regexp($regexp, $args, $globals)""" 4
.el .IP "\f(CW_exporter_expand_regexp($regexp, $args, $globals)\fR" 4
.IX Item "_exporter_expand_regexp($regexp, $args, $globals)"
Like \f(CW\*(C`_exporter_expand_regexp\*(C'\fR, but given a regexp-like string instead
of a tag name.
.Sp
The default implementation greps through \f(CW@EXPORT_OK\fR for imports,
and the list of already-imported functions for exports.
.ie n .IP """_exporter_expand_sub($name, $args, $globals)""" 4
.el .IP "\f(CW_exporter_expand_sub($name, $args, $globals)\fR" 4
.IX Item "_exporter_expand_sub($name, $args, $globals)"
This method is called to translate a sub name to a hash of name => coderef
pairs for exporting to the caller. In general, this would just be a hash with
one key and one value, but, for example, Type::Library overrides this
method so that \f(CW"+Foo"\fR gets expanded to:
.Sp
.Vb 6
\&   (
\&      Foo         => sub { $type },
\&      is_Foo      => sub { $type\->check(@_) },
\&      to_Foo      => sub { $type\->assert_coerce(@_) },
\&      assert_Foo  => sub { $type\->assert_return(@_) },
\&   )
.Ve
.Sp
The default implementation checks that the name is allowed to be exported
(using the \f(CW\*(C`_exporter_permitted_regexp\*(C'\fR method), gets the coderef using
the generator if there is one (or by calling \f(CW\*(C`can\*(C'\fR on your exporter
otherwise) and calls \f(CW\*(C`_exporter_fail\*(C'\fR if it's unable to generate or
retrieve a coderef.
.ie n .IP """_exporter_permitted_regexp($globals)""" 4
.el .IP "\f(CW_exporter_permitted_regexp($globals)\fR" 4
.IX Item "_exporter_permitted_regexp($globals)"
This method is called to retrieve a regexp for validating the names of
exportable subs. If a sub doesn't match the regexp, then the default
implementation of \f(CW\*(C`_exporter_expand_sub\*(C'\fR will refuse to export it. (Of
course, you may override the default \f(CW\*(C`_exporter_expand_sub\*(C'\fR.)
.Sp
The default implementation of this method assembles the regexp from
\&\f(CW@EXPORT\fR and \f(CW@EXPORT_OK\fR.
.ie n .IP """_exporter_fail($name, $args, $globals)""" 4
.el .IP "\f(CW_exporter_fail($name, $args, $globals)\fR" 4
.IX Item "_exporter_fail($name, $args, $globals)"
Called by \f(CW\*(C`_exporter_expand_sub\*(C'\fR if it can't find a coderef to export.
.Sp
The default implementation just throws an exception. But you could emit
a warning instead, or just ignore the failed export.
.Sp
If you don't throw an exception then you should be aware that this
method is called in list context, and any list it returns will be treated
as an \f(CW\*(C`_exporter_expand_sub\*(C'\fR\-style hash of names and coderefs for
export.
.ie n .IP """_exporter_install_sub($name, $args, $globals, $coderef)""" 4
.el .IP "\f(CW_exporter_install_sub($name, $args, $globals, $coderef)\fR" 4
.IX Item "_exporter_install_sub($name, $args, $globals, $coderef)"
This method actually installs the exported sub into its new destination.
Its return value is ignored.
.Sp
The default implementation handles sub renaming (i.e. the \f(CW\*(C`\-as\*(C'\fR,
\&\f(CW\*(C`\-prefix\*(C'\fR and \f(CW\*(C`\-suffix\*(C'\fR functions. This method does a lot of
stuff; if you need to override it, it's probably a good idea to just
pre-process the arguments and then call the super method rather than
trying to handle all of it yourself.
.ie n .IP """_exporter_uninstall_sub($name, $args, $globals)""" 4
.el .IP "\f(CW_exporter_uninstall_sub($name, $args, $globals)\fR" 4
.IX Item "_exporter_uninstall_sub($name, $args, $globals)"
The opposite of \f(CW\*(C`_exporter_install_sub\*(C'\fR.
.SH "DIAGNOSTICS"
.IX Header "DIAGNOSTICS"
.ie n .IP "\fBOverwriting existing sub '%s::%s' with sub '%s' exported by \fB%s\fB\fR" 4
.el .IP "\fBOverwriting existing sub '%s::%s' with sub '%s' exported by \f(CB%s\fB\fR" 4
.IX Item "Overwriting existing sub '%s::%s' with sub '%s' exported by %s"
A warning issued if Exporter::Tiny is asked to export a symbol which
will result in an existing sub being overwritten. This warning can be
suppressed using either of the following:
.Sp
.Vb 2
\&   use MyUtils { replace => 1 }, "frobnicate";
\&   use MyUtils "frobnicate" => { \-replace => 1 };
.Ve
.Sp
Or can be upgraded to a fatal error:
.Sp
.Vb 2
\&   use MyUtils { replace => "die" }, "frobnicate";
\&   use MyUtils "frobnicate" => { \-replace => "die" };
.Ve
.ie n .IP "\fBRefusing to overwrite existing sub '%s::%s' with sub '%s' exported by \fB%s\fB\fR" 4
.el .IP "\fBRefusing to overwrite existing sub '%s::%s' with sub '%s' exported by \f(CB%s\fB\fR" 4
.IX Item "Refusing to overwrite existing sub '%s::%s' with sub '%s' exported by %s"
The fatal version of the above warning.
.ie n .IP "\fBCould not find sub '%s' exported by \fB%s\fB\fR" 4
.el .IP "\fBCould not find sub '%s' exported by \f(CB%s\fB\fR" 4
.IX Item "Could not find sub '%s' exported by %s"
You requested to import a sub which the package does not provide.
.IP "\fBCannot provide an \-as option for tags\fR" 4
.IX Item "Cannot provide an -as option for tags"
Because a tag may provide more than one function, it does not make sense
to request a single name for it. Instead use \f(CW\*(C`\-prefix\*(C'\fR or \f(CW\*(C`\-suffix\*(C'\fR.
.IP "\fBPassing options to unimport '%s' makes no sense\fR" 4
.IX Item "Passing options to unimport '%s' makes no sense"
When you import a sub, it occasionally makes sense to pass some options
for it. However, when unimporting, options do nothing, so this warning
is issued.
.SH "HISTORY"
.IX Header "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.
.SH "OBLIGATORY EXPORTER COMPARISON"
.IX Header "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                              
\& 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 "BUGS"
.IX Header "BUGS"
Please report any bugs to
<http://rt.cpan.org/Dist/Display.html?Queue=Exporter\-Tiny>.
.SH "SUPPORT"
.IX Header "SUPPORT"
\&\fB\s-1IRC:\s0\fR support is available through in the \fI#moops\fR channel
on irc.perl.org <http://www.irc.perl.org/channels.html>.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
Exporter::Shiny,
Sub::Exporter,
Exporter.
.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 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

Youez - 2016 - github.com/yon3zu
LinuXploit