PERL with Thread.pm

C

Charlie

Hi folks,
The version of perl that I am using on my company's linux machine is
5.6.1, which does not include Thread.pm. And it happens that I need to
have some perl scripts created on my home PC to be running on that
platform, and those scripts "use Thread".

I was looking for the necessary modules from www.cpan.org to add on
and what I realize is I had to add the whole perl package to have it
included. So here is my question:
1. Is there some "patches" that just has this part included, not the
whole perl install package?
2. If I have to have the whole Perl 5.8.4 or high version installed on
linux, what the minimum installation size going to be? Also any tips
for the installation? I guess if I am going to do it, it would be done
in my home dir, otherwise the requst would take days to finish.
3. If for any reason, I have to use the existing perl, what I might do
to work around, following are the only part of code that uses Thread
in that scripts.
"
.....
use Thread;
my $thread1 = Thread->new(\&func1);
my $thread2 = Thread->new(\&func2);
my $thread3 = Thread->new(\&func3);
$_->join foreach($thread1, $thread2, $thread3);
"

thanks for the tips.



CJ
 
J

Jack Challen

Charlie said:
1. Is there some "patches" that just has this part included, not the
whole perl install package?

Not really, it's an option that you'd have to supply when building Perl
yourself from the source code (-DUSETHREADS IIRC). It's not just a matter
of adding a couple of modules.

Some distributions may have taken to building perl with threads enabled -
you should check to see if you've got the latest package of perl available
for your distribution, and if there's a thread-enabled version available.

hope that helps.

jack
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top