Once the script gets "compiled" with perlapp or perl2exe, the script just refuses to connect and bring home any data..
Below is some of the output from the test script when runned with "use debug"-option on and compiled with perlapp:
The test-script:LWP::UserAgent::new: () LWP::Parallel::UserAgent::register: (http://www.cnn.com, CODE(0xd91f90 +), [undef] , [undef]) LWP::Parallel::UserAgent::register: (http://www.sun.com, CODE(0xd91f90 +), [undef] , [undef]) LWP::Parallel::UserAgent::register: (http://www.msn.com, CODE(0xd91f90 +), [undef] , [undef]) LWP::Parallel::UserAgent::register: (http://www.sun.com, CODE(0xd91f90 +), [undef] , [undef]) LWP::Parallel::UserAgent::register: (http://www.bbc.co.uk, CODE(0xd91f +90), [unde f], [undef]) LWP::Parallel::UserAgent::wait: Current Server: 0 [ ] Pending Server: 4 [ www.msn.com:80, 1, www.cnn.com:80, 1, www. +sun.com:80 , 2, www.bbc.co.uk:80, 1 ] LWP::Parallel::UserAgent::_make_connections_unordered: () LWP::Parallel::UserAgent::_check_bandwith: (LWP::Parallel::UserAgent:: +Entry=HASH (0xe114a4) [http://www.msn.com] ) LWP::Parallel::UserAgent::on_connect: (http://www.msn.com) LWP::Parallel::UserAgent::_connect: (LWP::Parallel::UserAgent::Entry=H +ASH(0xe114 a4) [http://www.msn.com] ) LWP::Parallel::UserAgent::init_request: -> (HTTP::Request=HASH(0xe0f96 +0)) [GET h ttp://www.msn.com] LWP::Parallel::UserAgent::init_request: GET http://www.msn.com LWP::UserAgent::_need_proxy: Not proxied LWP::Parallel::UserAgent::on_failure: (http://www.msn.com) LWP::Parallel::UserAgent::_check_bandwith: Failed connection for 'www. +msn.com:80 ' LWP::Parallel::UserAgent::_make_connections_unordered: Queue for www.m +sn.com:80 contains 0 pending connections LWP::Parallel::UserAgent::_check_bandwith: (LWP::Parallel::UserAgent:: +Entry=HASH (0xe0f768) [http://www.cnn.com] ) LWP::Parallel::UserAgent::on_connect: (http://www.cnn.com) LWP::Parallel::UserAgent::_connect: (LWP::Parallel::UserAgent::Entry=H +ASH(0xe0f7 68) [http://www.cnn.com] ) LWP::Parallel::UserAgent::init_request: -> (HTTP::Request=HASH(0xa0c23 +c)) [GET h ttp://www.cnn.com] LWP::Parallel::UserAgent::init_request: GET http://www.cnn.com LWP::UserAgent::_need_proxy: Not proxied LWP::Parallel::UserAgent::on_failure: (http://www.cnn.com) LWP::Parallel::UserAgent::_check_bandwith: Failed connection for 'www. +cnn.com:80 ' LWP::Parallel::UserAgent::_make_connections_unordered: Queue for www.c +nn.com:80 contains 0 pending connections LWP::Parallel::UserAgent::_check_bandwith: (LWP::Parallel::UserAgent:: +Entry=HASH (0xe0fa08) [http://www.sun.com] ) LWP::Parallel::UserAgent::on_connect: (http://www.sun.com) LWP::Parallel::UserAgent::_connect: (LWP::Parallel::UserAgent::Entry=H +ASH(0xe0fa 08) [http://www.sun.com] ) LWP::Parallel::UserAgent::init_request: -> (HTTP::Request=HASH(0xe0f6b +4)) [GET h ttp://www.sun.com] LWP::Parallel::UserAgent::init_request: GET http://www.sun.com LWP::UserAgent::_need_proxy: Not proxied LWP::Parallel::UserAgent::on_failure: (http://www.sun.com) LWP::Parallel::UserAgent::_check_bandwith: Failed connection for 'www. +sun.com:80 ' LWP::Parallel::UserAgent::_check_bandwith: (LWP::Parallel::UserAgent:: +Entry=HASH (0xe11624) [http://www.sun.com] ) LWP::Parallel::UserAgent::on_connect: (http://www.sun.com) LWP::Parallel::UserAgent::_connect: (LWP::Parallel::UserAgent::Entry=H +ASH(0xe116 24) [http://www.sun.com] ) LWP::Parallel::UserAgent::init_request: -> (HTTP::Request=HASH(0xe113f +c)) [GET h ttp://www.sun.com] LWP::Parallel::UserAgent::init_request: GET http://www.sun.com LWP::UserAgent::_need_proxy: Not proxied LWP::Parallel::UserAgent::on_failure: (http://www.sun.com) LWP::Parallel::UserAgent::_check_bandwith: Failed connection for 'www. +sun.com:80 ' LWP::Parallel::UserAgent::_make_connections_unordered: Queue for www.s +un.com:80 contains 0 pending connections .... ....
Any ideas?use strict; use LWP::Parallel::UserAgent; #Turns on debug mode _ outputs lot of info.. use LWP::Debug qw(+); $|++; my @sites = qw ( http://www.cnn.com http://www.sun.com http://www.msn.com http://www.sun.com http://www.bbc.co.uk ); my $totalbytes = 0; my $pua = LWP::Parallel::UserAgent->new(); #Build requests foreach (@sites) { my $req = HTTP::Request->new('GET',$_); $pua->register($req, \&Callback); } #Initiate request $pua->wait(); printf "\n\nTotalbytes read:%.2f KB", $totalbytes/1024; sub Callback { my ($data, $response, $protocol) = @_; $totalbytes += length $data; print "\nGot ",length $data," bytes of data from ", $response->bas +e; }
Thanks.
In reply to Using LWP::Parallel::UserAgent with perlapp/perl2exe by ldln
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |