logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Exporter::Tiny - an exporter with the features of Sub::Exporter but only core dependencies

Author

Toby Inkster <tobyink@cpan.org>.

Bugs

Please report any bugs to <https://github.com/tobyink/p5-exporter-tiny/issues>.

Description

Exporter::Tiny supports many of Sub::Exporter's external-facing features including renaming imported functions with the "-as", "-prefix" and "-suffix" options; explicit destinations with the "into" option; and alternative installers with the "installer" option. But it's written in only about 40% as many lines of code and with zero non-core dependencies. Its internal-facing interface is closer to Exporter.pm, with configuration done through the @EXPORT, @EXPORT_OK and %EXPORT_TAGS package variables. If you are trying to write a module that inherits from Exporter::Tiny, then look at: • Exporter::Tiny::Manual::QuickStart • Exporter::Tiny::Manual::Exporting If you are trying to use a module that inherits from Exporter::Tiny, then look at: • Exporter::Tiny::Manual::Importing

Disclaimer Of Warranties

THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. perl v5.36.0 2023-06-11 Exporter::Tiny(3pm)

Name

Exporter::Tiny - an exporter with the features of Sub::Exporter but only core dependencies

See Also

<https://exportertiny.github.io/>. Simplified interface to this module: Exporter::Shiny. Less tiny version, with more features: Exporter::Almighty. Other interesting exporters: Sub::Exporter, Exporter.

Synopsis

package MyUtils; use base "Exporter::Tiny"; our @EXPORT = qw(frobnicate); sub frobnicate { ... } 1; package MyScript; use MyUtils "frobnicate" => { -as => "frob" }; print frob(42); exit;

See Also