I wanted the same thing so I wrote
Exporter::Easy. It's a frontend to Exporter, it allows you to do
use strict;
package MyModule;
use Exporter::Easiest qw(
:base => $base1 $base2
:extra => $extra1 $extra2
:bonus => $bonus1 $bonus2
:useful => $extra1 $bonus1
:useless => :extra :bonus !:useful
:no_bonus => :all !:bonus
EXPORT => :base
ALL => all
OK => $not_exported_by_default
);
$base1 = 1;
$base2 = 2;
...
this code
- sets up @EXPORT, @EXPORT_OK and %EXPORT_TAGS
- makes the class inherit from Exporter
- defines a tag called :all that represents all the symbols
- does a use vars for you on the variables that occur in the export spec.
I think this does everything you're looking for.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.