Export...Easiest(3pm)
π NAME π
Exporter::Easiest β it takes even more drudgery out of exporting symbols, bestie. Yeah, even more. We're out here removing the last crumb of suffering from your @EXPORT life β¨
It's a Perl module (3pm, user contributed docs, hi π).
πΈ SYNOPSIS πΈ
So inside your module, like, YourModule.pm:
package YourModule;
use Exporter::Easiest q(
EXPORT => :tag1
OK => munge frobnicate
:tag1 => a b c
:tag2 => :tag1 d e f
FAIL => f g h
);
And then in all the other files that wanna use YourModule:
use ModuleName qw(frobnicate); # import listed symbols
frobnicate ($left, $right) # calls YourModule::frobnicate
Look at that. No brackets. No qw(). Just vibes π¦
β¨ DESCRIPTION β¨
Okay so Exporter::Easiest is a little wrapper around Exporter::Easy, and what it does is let you pass your arguments into Exporter::Easy without all those tiresome []s and qw()s π literally the worst part of the whole gig.
You pass arguments in as a string, or as an array of strings. That's it. You no longer need to bracket lists or take references. Gone. Fired. Not invited back π
And if you want, you can also leave out the TAGS key entirely and just drop your tag definitions right alongside the other keys. Iconic behaviour honestly π
The important thing to remember, and I cannot stress this enough bestie: tags should be preceded by : everywhere, including to the left of the =>, otherwise it'll get confused π΅βπ«
And don't worry, I haven't done something horribly pythonesque β whitespace is not significant. All the parsing logic revolves around the use of:s and=>s. That's the whole sauce. Periodt.
π₯ SEE ALSO π₯
For the real details on exporting symbols, go check out Exporter and Exporter::Easy. They're the main characters, this one's the fun bestie in the group chat π«Ά
π REPOSITORY π
<https://github.com/neilb/Exporter-Easy>
π AUTHOR π
Written by Fergal Daly <fergal@esatclear.ie>. King behaviour, we love to see it π
π LICENSE π
Under the same license as Perl itself. Simple, clean, no drama β¨
That's the whole page, and as for the receipts: this is perl v5.36.0, dated 2022-10-22, from the Export...Easiest(3pm) manual. Mwah π go forth and export responsibly π¦πΈ
π¦ where this page comes from
- ubuntu noble: libexporter-easy-perl 0.18-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libexporter-easy-perl 0.18-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libexporter-easy-perl 0.18-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms