On Dec 26, 8:02 am, jeffp...@netzero.net (Jeff Peng) wrote: > Hello, > > 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? >
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 -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/