Rodent of Unusual Size <[EMAIL PROTECTED]> writes:

> Gisle Aas wrote:
> > 
> > Then your CPAN must be stale.  It is on CPAN.  It was upload almost 2
> > weeks ago.  http://search.cpan.org/search?dist=libwww-perl
> 
> Yrrg.  Got it; Duke.Edu was stale.  Next question: how
> may I verify in my script that the LWP I have is at least
> 5.60?

Add a line near the top of your script that says:

   use LWP 5.60;

This makes the script fail to run (die) if an older version of the
library is installed.  Unfortunately, it will produce a message that
says something like:

   LWP version 5.6 required--this is only version 5.21 at foo line 1.
   BEGIN failed--compilation aborted at foo line 1.

The 5.6 (without the trailing '0') might confuse somebody.
Alternatively you could check directly agains $LWP::VERSION with code like:

   require LWP;
   if ($LWP::VERSION < 5.60) {
        die <<"EOT";
You need a version of LWP with HTTP/1.1 support.  That means
version 5.60 or better.  The installed version is only $LWP::VERSION.
EOT
   }

Regards,
Gisle

Reply via email to