line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::Slackeria::Plugin::Whohas; |
2
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
5631672
|
use strict; |
|
6
|
|
|
|
|
634
|
|
|
6
|
|
|
|
|
325
|
|
4
|
6
|
|
|
6
|
|
39
|
use warnings; |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
312
|
|
5
|
6
|
|
|
6
|
|
277
|
use 5.010; |
|
6
|
|
|
|
|
23
|
|
|
6
|
|
|
|
|
275
|
|
6
|
|
|
|
|
|
|
|
7
|
6
|
|
|
6
|
|
1149
|
use parent 'App::Slackeria::Plugin'; |
|
6
|
|
|
|
|
514
|
|
|
6
|
|
|
|
|
68
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = '0.12'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub run_whohas { |
12
|
0
|
|
|
0
|
0
|
|
my ( $self, $distro, $name ) = @_; |
13
|
|
|
|
|
|
|
|
14
|
0
|
|
|
|
|
|
my $out = qx{whohas --no-threads --strict -d $distro $name}; |
15
|
|
|
|
|
|
|
|
16
|
0
|
0
|
0
|
|
|
|
if ( not defined $out or $out eq q{} ) { |
17
|
0
|
|
|
|
|
|
die("not found\n"); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
0
|
|
|
|
|
|
$out = ( split( /\n/, $out ) )[-1]; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
return { |
23
|
0
|
|
|
|
|
|
data => substr( $out, 51, 10 ), |
24
|
|
|
|
|
|
|
href => substr( $out, 112 ), |
25
|
|
|
|
|
|
|
}; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
__END__ |