[Israel.pm] exporting all the functions in a module

Gaal Yahas gaal at forum2.org
Tue Feb 1 07:19:41 PST 2005


Shlomi Fish wrote:

>On Monday 31 January 2005 20:17, Gaal Yahas wrote:
>  
>
>>On Mon, Jan 31, 2005 at 07:56:50PM +0200, Shlomi Fish wrote:
>>    
>>
>>>    my %remove = (map { $_ => 1 } (qw(BEGIN INIT import CHECK DESTROY
>>>END)));
>>>      
>>>
>>Of these, only DESTROY and import do anything. The rest are not subs.
>>    
>>
>
>I don't know if they are subs or not, but they do appear in the symbol table:
>  
>
Yes, but their GLOBs do not have CODE slots defined. You have to filter
on that criterion anyway or else you'll be exporting things that are not 
subs.

-- 

Gaal Yahas <gaal at forum2.org>
http://gaal.livejournal.com/




More information about the Perl mailing list