| 1 |
NAME |
| 2 |
Exporter::Tiny - an exporter with the features of Sub::Exporter but only |
| 3 |
core dependencies |
| 4 |
|
| 5 |
SYNOPSIS |
| 6 |
package MyUtils; |
| 7 |
use base "Exporter::Tiny"; |
| 8 |
our @EXPORT = qw(frobnicate); |
| 9 |
sub frobnicate { ... } |
| 10 |
1; |
| 11 |
|
| 12 |
package MyScript; |
| 13 |
use MyUtils "frobnicate" => { -as => "frob" }; |
| 14 |
print frob(42); |
| 15 |
exit; |
| 16 |
|
| 17 |
DESCRIPTION |
| 18 |
Exporter::Tiny supports many of Sub::Exporter's external-facing features |
| 19 |
including renaming imported functions with the `-as`, `-prefix` and |
| 20 |
`-suffix` options; explicit destinations with the `into` option; and |
| 21 |
alternative installers with the `installer` option. But it's written in |
| 22 |
only about 40% as many lines of code and with zero non-core dependencies. |
| 23 |
|
| 24 |
Its internal-facing interface is closer to Exporter.pm, with configuration |
| 25 |
done through the @EXPORT, @EXPORT_OK and %EXPORT_TAGS package variables. |
| 26 |
|
| 27 |
If you are trying to write a module that inherits from Exporter::Tiny, |
| 28 |
then look at: |
| 29 |
|
| 30 |
* Exporter::Tiny::Manual::QuickStart |
| 31 |
|
| 32 |
* Exporter::Tiny::Manual::Exporting |
| 33 |
|
| 34 |
If you are trying to use a module that inherits from Exporter::Tiny, then |
| 35 |
look at: |
| 36 |
|
| 37 |
* Exporter::Tiny::Manual::Importing |
| 38 |
|
| 39 |
BUGS |
| 40 |
Please report any bugs to |
| 41 |
<https://github.com/tobyink/p5-exporter-tiny/issues>. |
| 42 |
|
| 43 |
SEE ALSO |
| 44 |
<https://exportertiny.github.io/>. |
| 45 |
|
| 46 |
Simplified interface to this module: Exporter::Shiny. |
| 47 |
|
| 48 |
Less tiny version, with more features: Exporter::Almighty. |
| 49 |
|
| 50 |
Other interesting exporters: Sub::Exporter, Exporter. |
| 51 |
|
| 52 |
AUTHOR |
| 53 |
Toby Inkster <[email protected]>. |
| 54 |
|
| 55 |
COPYRIGHT AND LICENCE |
| 56 |
This software is copyright (c) 2013-2014, 2017, 2022-2025 by Toby Inkster. |
| 57 |
|
| 58 |
This is free software; you can redistribute it and/or modify it under the |
| 59 |
same terms as the Perl 5 programming language system itself. |
| 60 |
|
| 61 |
DISCLAIMER OF WARRANTIES |
| 62 |
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED |
| 63 |
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF |
| 64 |
MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
| 65 |
|