in reply to Can't instantiate Thread::Pool

The two lines you quoted are not "essentially the first two lines" of the synopsis. Looking at Thread::Pool, the first three lines are:

use Thread::Pool; $pool = Thread::Pool->new( {

So, likely ->new() takes a hashref instead of a list as arguments.

Replies are listed 'Best First'.
Re^2: Can't instantiate Thread::Pool
by alain_desilets (Beadle) on Sep 20, 2011 at 15:22 UTC
    Oh, I see. I was looking at the documentation for version 0.1:

    http://search.cpan.org/~micb/ThreadPool-0.1/Pool.pm#SYNOPSIS

    which was the first hit that came on Google. I now see that I should be using the doc for version 0.3:

    http://search.cpan.org/~elizabeth/Thread-Pool-0.33/lib/Thread/Pool.pm#SYNOPSIS