在 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);