GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Exporter::Easiest(3) User Contributed Perl Documentation Exporter::Easiest(3)
 

Exporter::Easiest - Takes even more drudgery out of Exporting symbols

In module 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
  );
In other files which wish to use YourModule:
  use ModuleName qw(frobnicate);      # import listed symbols
  frobnicate ($left, $right)          # calls YourModule::frobnicate

The Exporter::Easiest module is a wrapper around Exporter::Easy. It allows you to pass the arguments into Exporter::Easy without all those tiresome []s and qw()s. You pass arguments in as a string or an array of strings. You no longer need to bracket lists or take references. If want, you can also leave out the TAGS key and just put tag definitions along with the other keys.
The important thing to remember is that 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

For the real details on exporting symbols see Exporter and Exporter::Easy.

<https://github.com/neilb/Exporter-Easy>

Written by Fergal Daly <fergal@esatclear.ie>.

Under the same license as Perl itself
2015-11-11 perl v5.28.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.