jlongino has asked for the wisdom of the Perl Monks concerning the following question:

Given the following code:
use Exporter; use vars qw(@ISA @EXPORT); our @ISA = qw(Exporter); our @EXPORT = qw(Keypressed LoadKeyHash);
What would be the proper way to document via the perlpod =EXPORT tag? Through my searches, I've found only one or two examples and the code either don't look quite the same as what I'm using or looks similar but doesn't include anything in the =EXPORT section. Are there considerations for/against the use of export as I've posted? If so, what would be the correct way to document the "correct" version?

Note: I've already looked at perldoc and associated man pages and they really don't cover this at all.

@a=split??,'just lose the ego and get involved!';
for(split??,'afqtw{|~'){print $a[ord($_)-97]}

Replies are listed 'Best First'.
(jeffa) Re: Perldoc and the =EXPORT tag
by jeffa (Bishop) on Sep 16, 2001 at 22:40 UTC
    I have never used the =EXPORT tag, i searched for it in perlman:perlpod, but did not find any mention. Personally, i just prefer to use =HEAD and =ITEM:
    =head1 EXPORTED THINGIES =over 4 =item Keypressed Blah blah blah...
    As for your second question about the use of EXPORT, here is what perlman:perlmodlib has to say:
      Do NOT export method names!

      Do NOT export anything else by default without a good reason!

      Exports pollute the namespace of the module user. If you must export try to use @EXPORT_OK in preference to @EXPORT and avoid short or common names to reduce the risk of name clashes.

    jeffa

      Amen! I wish module writers would heed that. Leaving the autogenerated comment in place but paying no attention to it is something that really grates on me.