1Exporter::Tiny(3) User Contributed Perl Documentation Exporter::Tiny(3)
2
3
4
6 Exporter::Tiny - an exporter with the features of Sub::Exporter but
7 only core dependencies
8
10 package MyUtils;
11 use base "Exporter::Tiny";
12 our @EXPORT = qw(frobnicate);
13 sub frobnicate { ... }
14 1;
15
16 package MyScript;
17 use MyUtils "frobnicate" => { -as => "frob" };
18 print frob(42);
19 exit;
20
22 Exporter::Tiny supports many of Sub::Exporter's external-facing
23 features including renaming imported functions with the "-as",
24 "-prefix" and "-suffix" options; explicit destinations with the "into"
25 option; and alternative installers with the "installer" option. But
26 it's written in only about 40% as many lines of code and with zero non-
27 core dependencies.
28
29 Its internal-facing interface is closer to Exporter.pm, with
30 configuration done through the @EXPORT, @EXPORT_OK and %EXPORT_TAGS
31 package variables.
32
33 If you are trying to write a module that inherits from Exporter::Tiny,
34 then look at:
35
36 · Exporter::Tiny::Manual::QuickStart
37
38 · Exporter::Tiny::Manual::Exporting
39
40 If you are trying to use a module that inherits from Exporter::Tiny,
41 then look at:
42
43 · Exporter::Tiny::Manual::Importing
44
46 Please report any bugs to
47 <http://rt.cpan.org/Dist/Display.html?Queue=Exporter-Tiny>.
48
50 IRC: support is available through in the #moops channel on irc.perl.org
51 <http://www.irc.perl.org/channels.html>.
52
54 Simplified interface to this module: Exporter::Shiny.
55
56 Other interesting exporters: Sub::Exporter, Exporter.
57
59 Toby Inkster <tobyink@cpan.org>.
60
62 This software is copyright (c) 2013-2014, 2017 by Toby Inkster.
63
64 This is free software; you can redistribute it and/or modify it under
65 the same terms as the Perl 5 programming language system itself.
66
68 THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
69 WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
70 MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
71
72
73
74perl v5.30.1 2020-01-30 Exporter::Tiny(3)