File Coverage

blib/lib/Acme/YAPC/Asia/2012/LTthon/Hakushu.pm
Criterion Covered Total %
statement 13 15 86.6
branch n/a
condition n/a
subroutine 5 5 100.0
pod n/a
total 18 20 90.0


line stmt bran cond sub pod time code
1             package Acme::YAPC::Asia::2012::LTthon::Hakushu;
2 2     2   96121 use 5.008_001;
  2         8  
  2         80  
3 2     2   13 use strict;
  2         4  
  2         171  
4 2     2   11 use warnings;
  2         10  
  2         133  
5              
6             our $VERSION = '0.03';
7              
8 2     2   1875 use parent qw(Exporter);
  2         713  
  2         20  
9             our @EXPORT = qw(hakushu);
10              
11 2     2   2054 use Furl;
  0            
  0            
12              
13             sub hakushu {
14             __PACKAGE__->push();
15             }
16              
17             sub push {
18             my($class) = @_;
19              
20             my $api = 'http://hachiojipm.org/hakushu/';
21              
22             my $ua = Furl->new(agent => sprintf '%s/%s', $class, $class->VERSION);
23              
24             my $res = $ua->post($api, [], [ send => 1 ]);
25              
26             return $res->code;
27             }
28              
29             1;
30             __END__