You changed my code, so it works now? If not, just try. I have no idea, why it is not working at me, really. Please help.
All right. wait is not responsible for actualy making the request. How do I know?
Usually by reading the documentation, or by Devel::Trace (very verbose), but since this is LWP, LWP::Debug. Here's a little snip
C:\>perl -MLWP::Debug=+ foobar.pl LWP::UserAgent::new: () LWP::Parallel::UserAgent::in_order: (0) ***********snip********** LWP::Parallel::UserAgent::register: (http://2ge.mine.nu/headers.php, [ +undef], [undef], [undef]) LWP::Parallel::UserAgent::wait: Current Server: 0 [ ] Pending Server: 1 [ 2ge.mine.nu:80, 10 ] LWP::Parallel::UserAgent::_make_connections_unordered: () LWP::Parallel::UserAgent::_check_bandwith: (LWP::Parallel::UserAgent:: +Entry=HASH(0x1cbaf28) [http://2ge.mine.nu/headers.php] ) ***********snip********** LWP::Parallel::UserAgent::on_connect: (http://2ge.mine.nu/headers.php) LWP::Parallel::UserAgent::_connect: (LWP::Parallel::UserAgent::Entry=H +ASH(0x1cbb174) [http://2ge.mine.nu/headers.php] ) LWP::Parallel::UserAgent::init_request: -> (HTTP::Request=HASH(0x1cabe +6c)) [GET http://2ge.mine.nu/headers.php] LWP::Parallel::UserAgent::init_request: GET http://2ge.mine.nu/headers +.php LWP::UserAgent::_need_proxy: Not proxied LWP::Parallel::UserAgent::init_request: <- (undef, [undef], LWP::Paral +lel::Protocol::http=HASH(0x1d39fa4), 10, 1) LWP::Parallel::Protocol::http::_connect: Socket is IO::Socket::INET=GL +OB(0x1d3a058) LWP::Parallel::UserAgent::_check_bandwith: (LWP::Parallel::UserAgent:: +Entry=HASH(0x1cbb288) [http://2ge.mine.nu/headers.php] ) ***********snip********** LWP::Parallel::UserAgent::_perform_write: Writing to Sockets LWP::Parallel::Protocol::http::write_request: write_request (HTTP::Req +uest=HASH(0x1cac16c), IO::Socket::INET=GLOB(0x1d3e62c), /headers.php, + [undef], 1 0, [undef]) LWP::Parallel::Protocol::http::write_request: GET /headers.php HTTP/1. +0 Host: 2ge.mine.nu User-Agent: My agent 10 ***********snip**********
Now since most of these aren't documented, the time comes to source dive. I start by examining LWP::Parallel::Protocol::http::write_request (since it is responsible for making the request as evident by the trace), and I see
sub write_request { my ($self, $request, $socket, $fullpath, $arg, $timeout, $proxy) = @ +_; ***********snip********** my $h = $request->headers->clone; ***********snip**********
but its not where the headers are set (agent isn't mentioned).

So now I look earlier in the trace, and this time I notice LWP::Parallel::UserAgent::init_request, so I examine it

***********snip********** my ($agent, $from, $timeout, $cookie_jar, $use_eval, $parse_head, $max_size, $nonblock) = @{$self}{qw(agent from timeout cookie_jar use_eval parse_head max_size nonblock)}; # Set User-Agent and From headers if they are defined $request->init_header('User-Agent' => $agent) if $agent; ***********snip**********
and would you look at that I've found where the headers (in particular User-Agent) are initialized. See how that works?

Do you now know what you have to do?

MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
** The third rule of perl club is a statement of fact: pod is sexy.


In reply to Re^5: LWP::Parallel in other way by PodMaster
in thread LWP::Parallel in other way by 2ge

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.