File Coverage

blib/lib/Alien/gputils.pm
Criterion Covered Total %
statement 15 29 51.7
branch 0 2 0.0
condition n/a
subroutine 5 13 38.4
pod 7 7 100.0
total 27 51 52.9


line stmt bran cond sub pod time code
1             package Alien::gputils;
2 1     1   15554 use strict;
  1         2  
  1         36  
3 1     1   4 use warnings;
  1         1  
  1         29  
4 1     1   425 use File::Which qw(which);
  1         798  
  1         59  
5 1     1   4 use File::Spec;
  1         1  
  1         33  
6              
7             our $VERSION = '0.02';
8             $VERSION = eval $VERSION;
9              
10 1     1   468 use parent 'Alien::Base';
  1         231  
  1         4  
11              
12             sub _get_gputils {
13 0     0     my $self = shift;
14 0           my $type = shift;
15 0           my $bd = $self->bin_dir;
16 0           my $exe = File::Spec->catfile($bd, $type);
17 0 0         return $exe if -e $exe;
18 0           $exe = which($type);
19 0           return $exe;
20             }
21 0     0 1   sub gpasm { return $_[0]->_get_gputils('gpasm'); }
22 0     0 1   sub gplink { return $_[0]->_get_gputils('gplink'); }
23 0     0 1   sub gplib { return $_[0]->_get_gputils('gplib'); }
24 0     0 1   sub gpdasm { return $_[0]->_get_gputils('gpdasm'); }
25 0     0 1   sub gpstrip { return $_[0]->_get_gputils('gpstrip'); }
26 0     0 1   sub gpvc { return $_[0]->_get_gputils('gpvc'); }
27 0     0 1   sub gpvo { return $_[0]->_get_gputils('gpvo'); }
28              
29             1;
30              
31             __END__