develooper Front page | perl.perl5.porters | Postings from July 2002

Re: Thread::Use - use a module inside a thread only

Thread Previous | Thread Next
Elizabeth Mattijsen
July 30, 2002 06:25
Re: Thread::Use - use a module inside a thread only
Message ID:
At 02:54 PM 7/30/02 +0200, Jenda Krynicky wrote:
>The problem with run-time "useit Foo" instead of compile-time "use
>Foo" is that the symbols are not exported while compiling, prototypes
>not "installed", constants not defined, etc. etc. etc.

Well, I guess YMMV...  prototypes aren't much use in an OO environment 
anyway, exports seems to work fine, judging from the testing that I 
did.  Constants may be another problem, let me check up on that...

>Would not it be simpler then to require() or do() the whole thread?
>         use threads;
>         $thread = threads->create(sub {do '';})
>         ...

Simpler by having to have a different file?  That doesn't make it simpler 
for me...  ;-)


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About