Skip Menu |

This queue is for tickets about the XML-TreePP CPAN distribution.

Report information
The Basics
Id: 28167
Status: resolved
Priority: 0/
Queue: XML-TreePP

People
Owner: Nobody in particular
Requestors: neil [...] neely.cx
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.19
Fixed in: (no value)



Subject: Feature Requrest - Ability to set a timeout for the LWP::UserAgent
I've been using the XML::RPC module which is derived off of your XML::TreePP module, and the combination is wonderfully useful for me. While deploying a number of XML::RPC tools I encountered a limitation of this setup however in that your module has a hard coded timeout of 10 seconds set to the LWP::Useragent call. This is a very sensible timeout for most applications, but some legacy tools are extremely slow and I need the ability to allow them more time to run. Looking over your code, I believe this will be trivial to add in, just modify: my $ua = LWP::UserAgent->new(); $ua->timeout(10); $ua->env_proxy(); to be: my $ua = LWP::UserAgent->new(); $ua->timeout($self->{timeout}); $ua->env_proxy(); And modify your constructor to be: sub new { my $package = shift; my $self = {@_}; $self->{timeout} = 10 unless defined $self->{timeout}; bless $self, $package; $self; } Because XML::RPC passes it's arguments onto your constructor it should automatically pick this feature up. Thank you for your time, Neil Neely neil@neely.cx
RT-Send-CC: xml-treepp [...] yahoogroups.com
I've just released version 0.20 of the module which supports "lwp_useragent" option in stead of "timeout". Your request: my $tpp = XML::TreePP->new( timeout => 10 ); XML::TreePP Version 0.20 now allows: my $ua = LWP::UserAgent->new( timeout => 10 ); my $tpp = XML::TreePP->new( lwp_useragent => $ua ); See: http://www.kawa.net/works/perl/treepp/treepp-e.html ---- Kawasaki Yusuke Show quoted text
> Fri Jul 13 17:35:29 2007: Request 28167 was acted upon. > Transaction: Ticket created by NEELY > Queue: XML-TreePP > Subject: Feature Requrest - Ability to set a timeout for the
LWP::UserAgent Show quoted text
> Broken in: 0.19 > Severity: Wishlist > Owner: Nobody > Requestors: neil@neely.cx > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=28167 > > > > I've been using the XML::RPC module which is derived off of your
XML::TreePP module, and Show quoted text
> the combination is wonderfully useful for me. > > While deploying a number of XML::RPC tools I encountered a limitation
of this setup however Show quoted text
> in that your module has a hard coded timeout of 10 seconds set to the
LWP::Useragent call. Show quoted text
> This is a very sensible timeout for most applications, but some legacy
tools are extremely Show quoted text
> slow and I need the ability to allow them more time to run. > > Looking over your code, I believe this will be trivial to add in, just
modify: Show quoted text
> my $ua = LWP::UserAgent->new(); > $ua->timeout(10); > $ua->env_proxy(); > > to be: > my $ua = LWP::UserAgent->new(); > $ua->timeout($self->{timeout}); > $ua->env_proxy(); > > And modify your constructor to be: > > sub new { > my $package = shift; > my $self = {@_}; > $self->{timeout} = 10 unless defined $self->{timeout}; > bless $self, $package; > $self; > } > > Because XML::RPC passes it's arguments onto your constructor it should
automatically pick Show quoted text
> this feature up. > > Thank you for your time, > > Neil Neely > neil@neely.cx