in reply to Export All Functions from a Module

That will also show your private parts, which is something that ordinarily one should never do in public. Assuming your package follows the naming convention of prepending an underscore to internal functions, one only has to further check that the first character of the function is not an underscore.

our @EXPORT = grep { defined *{${__PACKAGE__.'::'}{$_}}{CODE} and substr($_,0,1) ne '_' } keys %{__PACKAGE__.'::'};
--
g r i n d e r
just another bofh

print@_{sort keys %_},$/if%_=split//,'= & *a?b:e\f/h^h!j+n,o@o;r$s-t%t#u';

Replies are listed 'Best First'.
Re: Re: Export All Functions from a Module
by George_Sherston (Vicar) on Jan 24, 2002 at 18:15 UTC
    A handy twist. My original desire was for something to use in a module I only used for development, which had a floating population of subroutines, all of which ultimately found their homes in more decorous locations, where their private parts were modestly covered. But I like this scheme: wouldn't want to frighten the horses inadvertently.

    § George Sherston