|
Re: RFC HTTP::Cache module: msg#00051lang.perl.modules.lwp
>>>>> "Mattias" == Mattias Holmlund <u1@xxxxxxxxxxxxxx> writes: Mattias> I have written a perl module that I want to publish on Mattias> CPAN. The module implements a cache for http requests. The module that I've designed a half dozen times in my head but never implemented would simply overload LWP::UserAgent's "simple_request" method with one that did caching transparently. Maybe if you thought about this enough, you could do that. Then I wouldn't have to finish writing the module that's in my head. The advantage this has is that you could take *any* application that ultimately uses LWP::UserAgent (and they pretty much all do, great job Gisle!), and then mixin your module, and you'd get caching for free. Such as: ## you add: use LWP::UserAgent::TransparentCache qw(cache => parameters); ## to this: use LWP::Simple; my $content = get("foo"); and it's done. Or anything more complex. And it'd still work. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <merlyn@xxxxxxxxxxxxxx> <URL:http://www.stonehenge.com/merlyn/> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | FW: Problem using HTML::Form with LWP & SSL: 00051, Steve Borruso |
|---|---|
| Next by Date: | Re: RFC HTTP::Cache module: 00051, Mattias Holmlund |
| Previous by Thread: | Re: RFC HTTP::Cache modulei: 00051, Ofer Nave |
| Next by Thread: | Re: RFC HTTP::Cache module: 00051, Mattias Holmlund |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |