| LWP-Simple-WithCache documentation | Contained in the LWP-Simple-WithCache distribution. |
LWP::Simple::WithCache - LWP::Simple with cache
use LWP::Simple;
use LWP::Simple::WithCache;
print get('http://www.leeym.com/');
LWP::Simple::WithCache reassign the $ua used by LWP::Simple to LWP::UserAgent::WithCache, and allow users to use the function provided by LWP::Simple with some cache functionality.
Users can access the cache object by using $LWP::Simple::ua->{cache} to get or set cache_root, namespace, etc.
LWP::Simple LWP::UserAgent::WithCache Cache::Cache Cache::FileCache
Yen-Ming Lee, <leeym@leeym.com>
Copyright (C) 2008 by Yen-Ming Lee
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
| LWP-Simple-WithCache documentation | Contained in the LWP-Simple-WithCache distribution. |
package LWP::Simple::WithCache; use strict; use LWP::Simple; use LWP::UserAgent::WithCache; our $VERSION = 0.03; $LWP::Simple::ua = new LWP::UserAgent::WithCache; $LWP::Simple::ua->agent("LWP::Simple::WithCache/$VERSION"); $LWP::Simple::FULL_LWP = 1; 1; __END__