PERL with Thread.pm

Discussion in 'Perl Misc' started by Charlie, May 13, 2004.

  1. Charlie

    Charlie Guest

    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
    Charlie, May 13, 2004
    #1
    1. Advertising

  2. Charlie

    Jack Challen Guest

    Charlie wrote:
    > 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
    Jack Challen, May 13, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dpackwood
    Replies:
    3
    Views:
    1,767
  2. pawo
    Replies:
    0
    Views:
    471
  3. PerlFAQ Server

    FAQ 1.4 What are Perl 4, Perl 5, or Perl 6?

    PerlFAQ Server, Jan 23, 2011, in forum: Perl Misc
    Replies:
    0
    Views:
    286
    PerlFAQ Server
    Jan 23, 2011
  4. PerlFAQ Server
    Replies:
    0
    Views:
    653
    PerlFAQ Server
    Feb 3, 2011
  5. PerlFAQ Server

    FAQ 1.4 What are Perl 4, Perl 5, or Perl 6?

    PerlFAQ Server, Feb 27, 2011, in forum: Perl Misc
    Replies:
    0
    Views:
    276
    PerlFAQ Server
    Feb 27, 2011
Loading...

Share This Page