File Coverage

blib/lib/App/Slackeria/Plugin/Whohas.pm
Criterion Covered Total %
statement 12 18 66.6
branch 0 2 0.0
condition 0 3 0.0
subroutine 4 5 80.0
pod 0 1 0.0
total 16 29 55.1


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__