File Coverage

blib/lib/WebService/Class.pm
Criterion Covered Total %
statement 6 6 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 8 8 100.0


line stmt bran cond sub pod time code
1             package WebService::Class;
2              
3 1     1   34180 use warnings;
  1         3  
  1         38  
4 1     1   6 use strict;
  1         2  
  1         69  
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             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<< >>
43              
44              
45             1; # End of WebService::Class