The latest version of LWP::UserAgent (v5.834) has a method of
"local_address", which is needed by my software.
The lower version of this module (for example, v5.824) doesn't have that
method.
So how to force to use the latest version of LWP::UserAgent in the perl
script?
Thanks.
Merry Holidays!
Jeff.
____________________________________________________________
Love Spell
Click here to light up your life with a love spell!
http://thirdpartyoffers.netzero.net/TGL2241/c?cp=WY6rCVc8u7r0rhlGINenTgAAJ1F5p0Q5uwV0jfKaKm9vU9yEAAYAAAAAAAAAAAAAAAAAAADNAAAAAAAAAAAAAAAAAAAARwAAAAA=
% perldoc -f use
use Module VERSION LIST
use Module VERSION
[...]
If the VERSION argument is present between Module and LIST,
then the "use" will call the VERSION method in class Module
with the given version as an argument. The default VERSION
method, inherited from the UNIVERSAL class, croaks if the
given
version is larger than the value of the variable
$Module::VERSION.
--
Peter Scott
http://www.perlmedic.com/
http://www.perldebugged.com/
http://www.informit.com/store/product.aspx?isbn=0137001274
>
> % perldoc -f use
> use Module VERSION LIST
> use Module VERSION
> [...]
> If the VERSION argument is present between Module and LIST,
> then the "use" will call the VERSION method in class Module
> with the given version as an argument. The default VERSION
> method, inherited from the UNIVERSAL class, croaks if the
> given
> version is larger than the value of the variable
> $Module::VERSION.
>
Thanks. That's right for me.
Regards,
Jeff.
use LWP::UserAgent 5.834; # See perldoc -f use
I'm not sure if there's a simpler way if loading with 'require
rather than 'use'. Perhaps:
use constant LWP_MIN_VER => 5.834;
require LWP::UserAgent;
unless ( $LWP::UserAgent::VERSION >= LWP_MIN_VER ) {
die "LWP::UserAgent version ", LWP_MIN_VER, " required",
"--this is only version $LWP::UserAgent::VERSION\n";
}
--
Charles DeRykus