blib/lib/Test2/Require/ProgramInPath.pm

filter: Statementstmt 81.8% 9 / 11 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 86.6% 13 / 15 CC 1 SCAR 0.7
CC
1
Cov
82%
BEGIN
1.3
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
↑ Summary
1 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 1 ▶use 5.020;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use experimental qw( signatures );
Subroutine BEGIN: called CC=1 SCAR=0.0
4 0 ▶use true;
Subroutine BEGIN: called CC=1 SCAR=2.6
5  
6 package Test2::Require::ProgramInPath 0.01 {
7  
8 # ABSTRACT: Skip test unless a program exists in the PATH
9  
10  
11 use File::Which ();
12 use Carp qw( confess );
13 use parent qw( Test2::Require );
14  
15 sub skip ( $, $program = undef ) {
16 confess "no program specified" unless defined $program;
17 return undef if File::Which::which $program;
18 return "This test only runs if $program is in the PATH";
19 }
20 }
21  
22 __END__
↑ Summary