| 1 | package WebService::Class; | ||
| 2 | |||
| 3 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | =head1 NAME | ||
| 7 | |||
| 8 | WebService::Class - WebService retrieve data by object. and have caching structure by file base or memcached base and more | ||
| 9 | |||
| 10 | =head1 VERSION | ||
| 11 | |||
| 12 | Version 0.01 | ||
| 13 | |||
| 14 | =cut | ||
| 15 | |||
| 16 | 1 | our $VERSION = '0.03'; | |
| 17 | |||
| 18 | |||
| 19 | =head1 SYNOPSIS | ||
| 20 | |||
| 21 | use web service | ||
| 22 | |||
| 23 | my $api = new WebService::Class::Twitter(username=>'username',password=>'password'; | ||
| 24 | my $result $cache_api->public_timeline(); | ||
| 25 | |||
| 26 | Cache manager use | ||
| 27 | |||
| 28 | file base cache | ||
| 29 | |||
| 30 | my $cache_manager = new WebService::Cache::FileCacheManager('cache_dir'=>'/tmp/.api_cache/'); | ||
| 31 | my $cache_api = new WebService::Class::Twitter(username=>'username',password=>'password','cache_manager'=>$cache_manager); | ||
| 32 | my $result = $cache_api->public_timeline(); | ||
| 33 | |||
| 34 | memcached base cache | ||
| 35 | |||
| 36 | my $cache_manager = new WebService::Cache::MemcachedCacheManager('servers'=>['127.0.0.1:11211']); | ||
| 37 | my $api = new WebService::Class::HatenaHaiku(username=>'username',password=>'password','cache_manager'=>$cache_manager); | ||
| 38 | my $result = $api->public_timeline(); | ||
| 39 | |||
| 40 | =head1 AUTHOR | ||
| 41 | |||
| 42 | Masafumi Yoshida, C<< <masafumi.yoshida820 at gmail.com> >> | ||
| 43 | |||
| 44 | |||
| 45 | 1; # End of WebService::Class | ||