Padre::Task::LWP - Generic HTTP client background processing task
# Fire and forget HTTP request Padre::Task::LWP->new( request => HTTP::Request->new( GET => 'http://perlide.org', ), )->schedule;
Sending and receiving data via HTTP.
my $task = Padre::Task::LWP->new( request => HTTP::Request->new( GET => 'http://perlide.org', ), );
The new constructor creates a Padre::Task for a background HTTP request.
new
It takes a single addition parameter request which is a fully-prepared HTTP::Request object for the request.
request
Returns a new Padre::Task::LWP object, or throws an exception on error.
The request method returns the HTTP::Request object that was provided to the constructor.
Before the run method has been fired the response method returns undef.
run
response
undef
After the run method has been fired the response method returns the HTTP::Response object for the LWP::UserAgent request.
Typically, you would use this in the finish method for the task, if you wish to take any further actions in Padre based on the result of the HTTP call.
finish
This class inherits from Padre::Task and its instances can be scheduled using Padre::TaskManager.
Padre::Task
Padre::TaskManager
The transfer of the objects to and from the worker threads is implemented with Storable.
Steffen Mueller smueller@cpan.org
smueller@cpan.org
Copyright 2008-2010 The Padre development team as listed in Padre.pm.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl 5 itself.
To install Padre, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Padre
CPAN shell
perl -MCPAN -e shell install Padre
For more information on module installation, please visit the detailed CPAN module installation guide.