[Israel.pm] small debts and large symbols

Uri Bruck bruck at actcom.net.il
Fri Oct 15 05:04:25 PDT 2004


Hi,
The other night at the perl mongers meeting I included a code sample 
that used a symbol generated by Symbol::gensym. As it was the subject 
matter I skimped over it.

The best reply I can give to some unaswered questions is from the Symbol 
module documentation.
The module is described as a module that "manipulate Perl symbols and 
their names"

The gensym method is described as:
"
Symbol::gensym creates an anonymous glob and returns a reference to it. 
Such a glob reference can be used as a file or directory handle.
"
and it does.


The rationale given for using it was a claim that using a regular file 
handle "might break future multithreading code"

I have neither written nor tested multi-threaded code. So I don't how 
much there is to this claim. So there's no reason to rush and replace 
all our file handles just yet. However, since it can be used a 
filehandle it's possible that some perl programmers do use it that way, 
and that such exists in the wild.


-- 
Thanks,
Uri
http://translation.israel.net



More information about the Perl mailing list