in reply to Exporting Dynamically Created Subroutines

Here's your problem:

@EXPORT = qw( foo );

This assignment takes place after the BEGIN block finishes, as the rest of the module executes during a use. It overwrites your carefully-constructed @EXPORT. Move it into the BEGIN block and all is well.

Replies are listed 'Best First'.
Re^2: Exporting Dynamically Created Subroutines
by agianni (Hermit) on Apr 03, 2007 at 18:43 UTC

    ++chromatic, that's the simple answer I was looking for! Actually, in an effort to keep my modules that export their functionality standard, I'm doing a: push @EXPORT, qw( foo ); at the top of the script, which works just as well.

    perl -e 'split//,q{john hurl, pest caretaker}and(map{print @_[$_]}(joi +n(q{},map{sprintf(qq{%010u},$_)}(2**2*307*4993,5*101*641*5261,7*59*79 +*36997,13*17*71*45131,3**2*67*89*167*181))=~/\d{2}/g));'