Skip Menu |

This queue is for tickets about the HTTP-ProxyAutoConfig CPAN distribution.

Report information
The Basics
Id: 76840
Status: open
Priority: 0/
Queue: HTTP-ProxyAutoConfig

People
Owner: MACKENNA [...] cpan.org
Requestors: mailforsachin [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.3
Fixed in: (no value)



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
In the first case, probably you didn't actually use "http://myproxyfile//proxypac.cgi", right? Is there a URL accessible from the internet that I can try, to see where/how/why it hangs? In the second case, can you please send me the file "c:/work/AUTO.cgi"? Why does this have suffix ".cgi"? In the first case I assumed you had a CGI script that sent a .pac file. If you're in a hurry to get something going, you can try HTTP::ProxyPAC as an alternative. It has approximately the same functionality, but depends on one of two JavaScript interpreter modules that you have to download and install. Sorry about this problem, Craig MacKenna craig@animalhead.com On Fri Apr 27 05:16:04 2012, sashsheen wrote: Show quoted text
> 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