Skip Menu |

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

Report information
The Basics
Id: 133612
Status: rejected
Priority: 0/
Queue: LWP-Simple-WithCache

People
Owner: leeym [...] leeym.com
Requestors: NHORNE [...] cpan.org
Cc:
AdminCc:

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



Subject: Constructor arguments
There is no way to pass in the arguments to the LWP::UserAgent::WithCache constructor such as cache_root.
在 2020-十月-26 11:49:38 星期一 時,NHORNE 寫到: Show quoted text
> There is no way to pass in the arguments to the > LWP::UserAgent::WithCache constructor such as cache_root.
By design LWP::UserAgent::WithCache constructor doesn't take any parameter. You can access $LWP::Simple::ua->{cache} which is a Cache::FileCache, therefore you can set cache_root by calling $LWP::Simple::ua->{cache}->set_cache_root($cache_root);