blib/lib/Test/DescribeMe.pm

filter: Statementstmt 90.9% 20 / 22 Branchbran 75.0% 3 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 90.3% 28 / 31 CC 4 SCAR 9.7
CC
4
Cov
88%
import
4.2
BEGIN
1.0
BEGIN
1.0
CRAP 2.6
↑ Summary
1 package Test::DescribeMe;
2 {
3 12 $Test::DescribeMe::VERSION = '0.004';
4 }
5  
6 12 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 12 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 12 ▶use Test::Settings qw(:all);
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 my %types = (
12 'smoke' => \&want_smoke,
13 4 ▶ 'interactive' => sub { ! want_non_interactive, },
Subroutine __ANON__: called CC=1 SCAR=0.0
14 12 'extended' => \&want_extended,
15 'author' => \&want_author,
16 'release' => \&want_release,
17 );
18  
19 12 ▶sub import {
Subroutine import: called CC=4 SCAR=14.5
20 12 my ($pkg, @arg) = @_;
21  
22 12 for my $type (@arg) {
23 12 ▶ unless ($types{$type}) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($types{$type}) 0 12 12
24 0 require Carp;
25 0 Carp::croak("Test type '$type' not known");
26 }
27  
28 12 ▶ unless ($types{$type}->()) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($types{$type}->()) 7 5 12
29 7 require Test::More;
30 7 Test::More::plan(skip_all => "Not running $type tests");
31 }
32 }
33 }
34  
35 12 1;
36 __END__
↑ Summary