Skip Menu |

This queue is for tickets about the IO-Lambda CPAN distribution.

Report information
The Basics
Id: 48351
Status: resolved
Priority: 0/
Queue: IO-Lambda

People
Owner: Nobody in particular
Requestors: njh [...] bandsman.co.uk
Cc:
AdminCc:

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



Subject: Reponse of IO::Lambda::HTTP doesn't support all messages
IO::Lambda::HTTP::http_request should return an HTTP::Reponse object. The returned object claims to be that type, but it doesn't support the base method of HTTP::Reponse. I get this error: njh@packard:~/src/njh$ ./lambda3 example: 438 bytes Use of uninitialized value in print at ./lambda3 line 21 (#1) (W uninitialized) An undefined value was used as if it were already defined. It was interpreted as a "" or a 0, but maybe it was a mistake. To suppress this warning assign a defined value to your variables. To help you figure out what was undefined, perl will try to tell you the name of the variable (if any) that was undefined. In some cases it cannot do this, so it also tells you what operation you used the undefined value in. Note, however, that perl optimizes your program and the operation displayed in the warning may not necessarily appear literally in your program. For example, "that $foo" is usually optimized into "that " . $foo, and the warning will refer to the concatenation (.) operator, even though there is no . in your program. base: njh@packard:~/src/njh$ From this program: njh@packard:~/src/njh$ cat lambda3 #!/usr/bin/perl -wT use strict; use warnings; use diagnostics; use HTTP::Request; use IO::Lambda qw(:lambda); use IO::Lambda::HTTP qw(http_request); lambda { context( HTTP::Request-> new(GET => 'http://www.example.com/'), async_dns => 1, keep_alive => 1, proxy => [ '192.168.1.1', '3128' ], ); http_request { my $res = shift; if ( ref($res) and ref($res) eq 'HTTP::Response') { print "example: ", length($res-> content), " bytes\n"; print "base: ", $res->base, "\n"; } else { print "example: error :$res\n"; } } }-> wait; njh@packard:~/src/njh$
Subject: lambda3
Download lambda3
application/octet-stream 579b

Message body not shown because it is not plain text.

Again, here's a patch. I think it won't work as is on your copy, sorry for that. Hope that works for you.
Download patch
application/octet-stream 497b

Message body not shown because it is not plain text.

On Fri Jul 31 07:52:10 2009, KARASIK wrote: Show quoted text
> Again, here's a patch. I think it won't work as is on your copy, sorry > for that. Hope that works for you.
sorry, wrong ticket, that goes to #48292
On Fri Jul 31 04:56:11 2009, KARASIK wrote: Show quoted text
> On Fri Jul 31 07:52:10 2009, KARASIK wrote:
> > Again, here's a patch. I think it won't work as is on your copy, sorry > > for that. Hope that works for you.
> > sorry, wrong ticket, that goes to #48292
Yes - it fixes 48292.
1.12 is out, this problem was addressed - please check if it was solved.
On Mon Aug 03 11:37:48 2009, KARASIK wrote: Show quoted text
> 1.12 is out, this problem was addressed - please check if it was solved.
Yes, it's fixed in 1.12 - thanks. I've closed this ticket.