Well, I was envisioning something more along the lines of:our @EXPORT = do { no strict 'refs'; grep { !/^_/ } grep { defined &$_ } keys %{ __PACKAGE__ . '::'}; };
I mean, you already have a grep there. Use it. {grin}our @EXPORT = do { no strict 'refs'; grep { defined &$_ and not /^_/; } keys %{ __PACKAGE__ . '::'}; };
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
In reply to Re^2: Automatically add all defined functions to your @EXPORT
by merlyn
in thread Automatically add all defined functions to your @EXPORT
by merlyn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |