Export...Easiest(3pm)

πŸ“¦
version 0.18 Β· 5 versions
, in ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– 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