line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WWW::Shorten::iiipe; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
821
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
51
|
|
4
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
42
|
|
5
|
1
|
|
|
1
|
|
7
|
use base 'Exporter'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
142
|
|
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
17154
|
use LWP::UserAgent; |
|
1
|
|
|
|
|
80206
|
|
|
1
|
|
|
|
|
180
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our @EXPORT = qw( makeashorterlink ); |
10
|
|
|
|
|
|
|
our $VERSION = '1.00'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
my $service = 'http://iii.pe'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub makeashorterlink($;%) { |
15
|
1
|
|
|
1
|
1
|
1044
|
my ( $url, %args ) = @_; |
16
|
1
|
|
|
|
|
8
|
my $ua = LWP::UserAgent->new; |
17
|
1
|
|
|
|
|
4456
|
my $resp = $ua->post( $service, { url => $url, %args } ); |
18
|
1
|
50
|
|
|
|
570120
|
return unless $resp->is_success; |
19
|
1
|
|
|
|
|
29
|
return $resp->content; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
1; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
__END__ |