On mån, 2004-10-04 at 23:14, Ofer Nave wrote: > What happens if you try to use it without calling init first? :) >
Your request is sent out uncached, i.e. as if you didn't do "use HTTP::TransparentCache" at all. > Perhaps this situation might be avoided if BasePath could be specified > at module load time, like so: > > use HTTP::TransparentCache ( BasePath => '/tmp/cache*' ); > Yes, that was suggested by Randal L. Schwartz as well. The reason I didn't do that is that I think that you want to have the BasePath as a user-configurable parameter. This parameter should probably be loaded from a configuration file and then you have to defer the loading of HTTP::TransparentCache until after you've loaded the configuration file. Calling init() explicitly seemed to involve less "magic" and would work more like a normal perl module. /Mattias