in reply to Re: Automatically add all defined functions to your @EXPORT
in thread Automatically add all defined functions to your @EXPORT
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.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Automatically add all defined functions to your @EXPORT
by dragonchild (Archbishop) on Jun 21, 2005 at 14:37 UTC | |
by BrowserUk (Patriarch) on Jun 21, 2005 at 15:03 UTC | |
by Tanktalus (Canon) on Jun 21, 2005 at 16:24 UTC | |
by BrowserUk (Patriarch) on Jun 21, 2005 at 17:09 UTC | |
by Transient (Hermit) on Jun 21, 2005 at 17:09 UTC | |
by dragonchild (Archbishop) on Jun 21, 2005 at 15:06 UTC | |
by ikegami (Patriarch) on Jul 14, 2005 at 20:48 UTC | |
by ikegami (Patriarch) on Jan 21, 2009 at 19:32 UTC |