Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the WWW-Mechanize-Cached CPAN distribution.

Report information
The Basics
Id: 5646
Status: resolved
Priority: 0/
Queue: WWW-Mechanize-Cached

People
Owner: Nobody in particular
Requestors: svhwan_forums1 [...] charter.net
Cc:
AdminCc:

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



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
Date: Fri, 12 Mar 2004 11:30:14 -0600
From: Andy Lester <andy [...] petdance.com>
To: Guest via RT <bug-WWW-Mechanize-Cached [...] rt.cpan.org>
CC: "AdminCc of cpan Ticket #5646": ;
Subject: Re: [cpan #5646] WWWW::Mechanize::Cache passing in args to the cache
RT-Send-Cc:
Show quoted text
> Or was there some reason that functionality was removed?
Yeah, 'cause it was a pain in the ass. :-) If you want to be able to specify parms for the cache, what I'll do is let the outside program instantiate the cache, and then pass that cache in as a parm to the constructor. If you're going to be passing parms, you might as well pass an entire object, no? It just means that the cache constructor is done outside of WWW::Mechanize::Cached instead of inside. The rest is identical. I'll make that change soon, probably tonite. xoa -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance
Added in 1.28. You can now define your own cache and pass it on in.