Subject: | My perl script stalls. There is no return |
Hi There,
I am using version 0.3.
When I run the code below:-
use lib ".";
use HTTP::ProxyAutoConfig;
my $pac = new HTTP::ProxyAutoConfig("http://myproxyfile//proxypac.cgi");
print $pac->FindProxy("https://www.google.com"),"\n";
print $pac->FindProxy("ftp://ftp.redhat.com"),"\n";
print $pac->FindProxy("www.yahoo.com"),"\n";
-->It simply stalls and waits on forever.
Here is my Perl version:
This is perl 5, version 14, subversion 2 (v5.14.2) built for
MSWin32-x86-multi-t
hread
(with 1 registered patch, see perl -V for more detail)
Copyright 1987-2011, Larry Wall
OS: WinXP
So, I downloaded the pac file and then used it locally as in:
use lib ".";
use HTTP::ProxyAutoConfig;
my $pac = new HTTP::ProxyAutoConfig("c:/work/AUTO.cgi");
print $pac->FindProxy("https://www.google.com"),"\n";
print $pac->FindProxy("ftp://ftp.redhat.com"),"\n";
print $pac->FindProxy("www.yahoo.com"),"\n";
Here is the message:
C:\work\Personal Documents\Perl\bin>perl auto_proxy.pl
Bad JavaScript->perl translation.
Please notify the co-maintainer of HTTP::ProxyAutoConfig:
Can't use global $2 in "my" at (eval 6) line 3, near ",$2"
Global symbol "$octets" requires explicit package name at (eval 6) line 3.
Global symbol "$ServerAddr" requires explicit package name at (eval 6)
line 3.
Global symbol "$var" requires explicit package name at (eval 6) line 3.
Global symbol "$BrowserAddr" requires explicit package name at (eval 6)
line 3.
Global symbol "$BrowserAddr" requires explicit package name at (eval 6)
line 31.
Global symbol "$octets" requires explicit package name at (eval 6) line 32.
Global symbol "$ServerAddr" requires explicit package name at (eval 6)
line 40.
Global symbol "$ServerAddr" requires explicit package name at (eval 6)
line 42.
Please assist.
I was able to use the same pac file to get the correct proxy server
using another tool called pactester available on Google code.
Thanks,
Sash