Subject: | WWWW::Mechanize::Cache passing in args to the cache |
I was looking at 1.26 and 1.27 of Mechanize::Cache and saw that in 1.27, you can no longer pass initialization parameters to the cache. I was wondering why that was?
I saw that there actually is a bug in 1.26, and was hoping that the bug would be fixed rather than the feature removed. (I actually just started using the module this week, found a problem, and couldn't let it go until I figured out how to fix it. I just found the fix last night. I went to report it this morning (now) and saw that this feature was removed altogether in 1.27? :(
The line:(in 1.26)
%{$opts{args}} = ( %{ $opts{args} }, %new );
should have read:
%{$opts{args}} = ( %{ $opts{args} }, %{$new{args}} );
It was also cool to be able to choose the cache type. Honestly, I would just use File anyway, but I did want to customize the args passed to my constructor. (like the ones listed, as well as the cache root.)
Outside of this, it looked like the only thing that changed for 1.27 was changing the namespace to 'www-mechanize-cached' which is a good thing. Could you restore 1.26 (with docs and cache-initializing-in-constructor and accompanying docs) and just change the default namespace?
If you do restore 1.26, there's actually a mistake in the docs in specifying the cache class - the docs say to call it 'class', but the code says 'cache_class'.
Or was there some reason that functionality was removed?
-Steve