I think that you are not giving the person using your module any flexibility about what subroutines they are accepting from you, and you are guaranteeing that some maintainance programmer later will be staring at some code and have no (easy) way of tracking down where sub1 and sub2 are defined, let alone what they do.
If you are developing any significant amount of code, both of these limitations are bad enough to keep me from wanting to use your module.
In short, Exporter doesn't offer its flexibility for the heck of it. It offers flexibility because that flexibility when used appropriately is useful for improving developer efficiency. If you don't like trading off runtime performance for developer efficiency, then Perl is probably the wrong language for you. You would be happier with something like C or C++ that allow you to get far better performance at the cost of more up front work.
Also if you are concerned with startup time because, for instance, you are trying to speed up a web page, then you would be far, far better off to eliminate it entirely through something like mod_perl.
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.