Stamm has asked for the wisdom of the Perl Monks concerning the following question:

Hello all!

I'm trying to upgrade LWP::UserAgent from 6.05 to 6.38 on my Perl 5.16.3 on Windows 10.
I'm using the command:
cpanm LWP::UserAgent
It fails to build the dependency Net::HTTP.
Here is the end of the log:
t/00-report-prereqs.t .. ok t/http-nb.t ............ skipped: This test doesn't work on Windows t/http.t ............... ok ******************************************************************* Using the default of SSL_verify_mode of SSL_VERIFY_NONE for client is deprecated! Please set SSL_verify_mode to SSL_VERIFY_PEER together with SSL_ca_file|SSL_ca_path for verification. If you really don't want to verify the certificate and keep the connection open to Man-In-The-Middle attacks please set SSL_verify_mode explicitly to SSL_VERIFY_NONE in your application. ******************************************************************* at t/live-https.t line 34. t/live-https.t ......... ok print() on unopened filehandle GEN1 at B:/PortableApps/CitrusPerl/perl +/lib/IO/Handle.pm line 417. sysread() on unopened filehandle GEN1 at B:/PortableApps/CitrusPerl/pe +rl/lib/IO/Handle.pm line 465. Status read failed: Bad file descriptor at C:\Users\user\.cpanm\work\1 +553969804.11504\Net-HTTP-6.18\blib\lib/Net/HTTP/Methods.pm line 282. # Looks like your test exited with 9 before it could output anything. t/live.t ............... Dubious, test returned 9 (wstat 2304, 0x900) Failed 6/6 subtests Test Summary Report ------------------- t/live.t (Wstat: 2304 Tests: 0 Failed: 0) Non-zero exit status: 9 Parse errors: Bad plan. You planned 6 tests but ran 0. Files=5, Tests=44, 3 wallclock secs ( 0.05 usr + 0.06 sys = 0.11 CP +U) Result: FAIL Failed 1/5 test programs. 0/44 subtests failed. dmake.exe: Error code 137, while making 'test_dynamic' -> FAIL Installing Net::HTTP failed. See C:\Users\user\.cpanm\build.lo +g for details. -> FAIL Installing the dependencies failed: Installed version (6.06) o +f Net::HTTP is not in range '6.18' -> FAIL Bailing out the installation for libwww-perl-6.38. Retry with +--prompt or --force. -> FAIL Installing the dependencies failed: Installed version (6.05) o +f LWP::UserAgent is not in range '6.06' -> FAIL Bailing out the installation for LWP-Protocol-https-6.07. Retr +y with --prompt or --force.
Would someone be kind enough to help me upgrading this module?
I don't understand what's going on.

Replies are listed 'Best First'.
Re: Upgrading LWP::UserAgent
by poj (Abbot) on Mar 31, 2019 at 13:18 UTC

    I also failed on Windows 10 with CitrusPerl 5.16.3 so I tried the latest version 5.24.1 which came with LWP::UserAgent 6.26. I then upgraded to 6.38 with no problem.

    D:\citrusperl-standard-52401-msw-x64-031\perl\bin>cpanm LWP::UserAgent
    Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^\#\s+PREREQ_PM => { <-- HERE \s*(.*?)\s*}/ at /loader/0x6728d0/App/cpan
    minus/script.pm line 1556.
    --> Working on LWP::UserAgent
    Fetching http://search.cpan.org/CPAN/authors/id/O/OA/OALDERS/libwww-perl-6.38.tar.gz ... OK
    Configuring libwww-perl-6.38 ... OK
    ==> Found dependencies: Net::HTTP
    --> Working on Net::HTTP
    Fetching http://search.cpan.org/CPAN/authors/id/O/OA/OALDERS/Net-HTTP-6.18.tar.gz ... OK
    Configuring Net-HTTP-6.18 ... OK
    Building and testing Net-HTTP-6.18 ... OK
    Successfully installed Net-HTTP-6.18 (upgraded from 6.13)
    Building and testing libwww-perl-6.38 ... OK
    Successfully installed libwww-perl-6.38 (upgraded from 6.26)
    2 distributions installed
    
    poj
      Yes, it seems I'm stuck with an old version. I could manually upgrade LWP::UserAgent to 6.13, and it was sufficient for my needs.

      I didn't know there was a new version of Citrus Perl. I should try it but it seems they have replaced Tk with Wx.
Re: Upgrading LWP::UserAgent
by bliako (Abbot) on Mar 30, 2019 at 22:54 UTC

    In my experience, such an error indicates that one opened a file for writing but one did not check if that open() was successful. Then one tried to print to the filehandle (of the unopened file) none-the-less, and, understandably, one got an error message.

    What's at B:/PortableApps/CitrusPerl/perl/lib/IO/Handle.pm line 417? cpan.org's IO::Handle, line 417 is my $this = shift;.