Exporte...ual::Etc(3)
β¨ NAME β¨
Exporter::Tiny::Manual::Etc β literally just the odds and ends, the misc drawer of the Exporter::Tiny docs π
(and yeah, that's the whole page title, Exporte...ual::Etc(3), bestie β they truncated it, iconic behaviour honestly)
π DESCRIPTION π
πΈ Utility Functions πΈ
Plot twist: Exporter::Tiny is itself an exporter! π€―
These functions are really for internal use, but lowkey you can export them if you need them:
mkopt(\@array)β it's givingmkoptfromData::OptList, but slimmed down. It does not support all the fancy options thatData::OptListdoes (moniker,require_unique,must_beandname_test) β but it runs about 50% faster, so, worth it. π₯mkopt_hash(\@array)β same vibe asmkopt_hashfromData::OptList. See alsomkoptup there. π
π¦ History π¦
okay so storytime. Type::Library had a bunch of custom exporting code that 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. π
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:
## import "Str" but rename it to "String".
use Types::Standard "Str" => { -as => "String" };
And so I decided to factor out code that could be shared by all Type-Tiny's exporters into a single place: Exporter::TypeTiny.
As of version 0.026, Exporter::TypeTiny was also made available as Exporter::Tiny, distributed independently on CPAN. CHOCOLATEBOY had convinced me that it was mature enough to live a life of its own. π§ main character energy fr fr
As of version 0.030, Type-Tiny depends on Exporter::Tiny and Exporter::TypeTiny is being phased out.
π Obligatory Exporter Comparison π
Exporting is unlikely to be your application's performance bottleneck, but nonetheless here are some comparisons. (not me being thorough π )
Comparative sizes according to Devel::SizeMe:
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
Performance exporting a single sub:
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% --
(Heads up:Exporter::Renamingglobally changes the behaviour ofExporter.pm, so could not be included in the same benchmarks. π)
(Also: certainSub::Exporter::Progressivefeatures are only available ifSub::Exporteris installed.)
(Non-Core) Dependencies:
Exporter -1
Exporter::Renaming 0
Exporter::Tiny 0
Sub::Exporter::Progressive 0
Sub::Exporter 3
Features:
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
π SEE ALSO π
- <https://exportertiny.github.io/> β¨
Exporter::Shiny,Exporter::Tiny. go read them bestie, iykyk π
π«Ά AUTHOR π«Ά
Toby Inkster <tobyink@cpan.org>.
π COPYRIGHT AND LICENCE π
This software is copyright (c) 2013-2014, 2017, 2022-2025 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. slay π
π 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.
no cap, that one's in all caps for a reason bestie, take it seriously π
and that's the whole page, you ate it π β this was perl v5.42.0, dated 2026-01-17, from the Exporte...ual::Etc(3) corner of the manual. bye pookie, go export something πΈ
π¦ where this page comes from
- fedora 44: perl-Exporter-Tiny 1.006003-2.fc44 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms