Skip Menu |

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

Report information
The Basics
Id: 50498
Status: open
Priority: 0/
Queue: HTTP-Lite

People
Owner: Nobody in particular
Requestors: nanis [...] runu.moc.invalid
Cc:
AdminCc:

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



Subject: request ignores $data_callback
The docs state that "If set_callback is used, $data_callback and $cbargs are not used." However, request does not set $callback_func to $data_callback if $self->{'callback_function'} is not defined and $data_callback is passed. Ditto for $cbargs. sub request { my ($self, $url, $data_callback, $cbargs) = @_; ... my $callback_func = $self->{'callback_function'}; my $callback_params = $self->{'callback_params'}; There should be a check to see if $callback_func is defined, and if it is not, $callback_func should be set to $data_callback. Since the code below checks if $callback_func is defined, there is no need for further checks. $callback_func = $data_callback unless defined $callback_func;
Correction: On closer inspection, it seems that a callback function given to request is treated differently than one that is set using set_callback and the docs don't explain this correctly. See http://stackoverflow.com/questions/1567895/perl-streaming-http