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

Hi Monks,
Am trying to hit a https - Vendor site using our proxy and trying to download a xls file, the scripting instructions are given by the Vendor themselves. Unfortunately am facing Error GETing : https://xxxxx :Attempt to reload LWP/Protocol/http.pm
I have the old version of perl installed in the machine where it is missing some modules, so I have extracted the latest in a folder along with necessary modules and created a dummy env file which am sourcing before running the script.
use strict; use File::Basename; use Getopt::Long; use WWW::Mechanize; use URI qw( ); my $thisScript = basename($0); print "==START $thisScript==\n"; my ($help, $proxy, $username, $password); my $urlsToBeDownloaded = "file-url-list.txt"; my $url = "https:xxxxxxxxxxxxx"; usage() if (@ARGV < 2 or ! GetOptions('proxy:s' => \$proxy, 'username=s' => \$username, 'password=s' => \$password) or defined $help); if ($username eq "" || $password eq "") { usage(); } my $mech = WWW::Mechanize->new(); if($proxy ne ""){ $mech->proxy(['http', 'https'], $proxy); } $mech->get($url);
Am getting error right at this point I have another team who has implemented this automation successfully. Any knowledge or suggestion will be greatly appreciated.
Thanks,
UMonk

Replies are listed 'Best First'.
Re: Attempt to reload LWP/Protocol/http.pm
by hippo (Archbishop) on Oct 20, 2016 at 22:14 UTC
    I have another team who has implemented this automation successfully.

    Why not do it the same way they did?

      Hi the team member who implemented was trying to help me , but even that person was not sure what is happening.
Re: Attempt to reload LWP/Protocol/http.pm
by jellisii2 (Hermit) on Oct 21, 2016 at 14:27 UTC