Skip Menu |

This queue is for tickets about the LWP-UserAgent-WithCache CPAN distribution.

Report information
The Basics
Id: 41476
Status: resolved
Priority: 0/
Queue: LWP-UserAgent-WithCache

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

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



Subject: Constructor should probably take a non-reference hash
LWP::UserAgent::WithCache->new wants the cache options in a hash reference. This is somewhat surprising, as LWP::UserAgent->new itself works with key-value pairs without a hash reference. So it would be nice if LWP::UserAgent::WithCache's constructor would support both, the hashref arguments for backward compatibility, and the key-value pairs to be more similar to LWP::UserAgent. Regards, Slaven
On Fri Dec 05 17:55:20 2008, SREZIC wrote: Show quoted text
> So it would be nice if LWP::UserAgent::WithCache's constructor would > support both, the hashref arguments for backward compatibility, and the > key-value pairs to be more similar to LWP::UserAgent.
I've added this approach in 0.10 so that now we can do this. my $ua = LWP::UserAgent::WithCache->new(namespace => 'other_cache_namespace', timeout => 99); maybe I should add the prefix, 'cache_', into those keys so that it might be going to change next release. Thank you for this great idea.