Tools/Condition.pm

filter: Statementstmt 100% 21 / 21 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 100% 1 / 1 totaltotal 100% 28 / 28 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Compare/Condition.pm ↑ Summary
1 package Test2::Tools::Condition;
2 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 2 our $VERSION = "0.03";
6  
7 2 ▶use Carp ();
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 2 ▶use Test2::Compare::Condition();
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 2 %Carp::Internal = (
12 %Carp::Internal,
13 'Test2::Tools::Condition' => 1,
14 'Test2::Compare::Condition' => 1,
15 );
16  
17 2 our @EXPORT = qw/condition/;
18 2 ▶use Exporter 'import';
Subroutine BEGIN: called CC=1 SCAR=0.0
19  
20 11 ▶sub condition (&) {
Subroutine condition: called CC=1 SCAR=0.0
Pod documented
21 11 my @caller = caller;
22 11 return Test2::Compare::Condition->new(
23 file => $caller[1],
24 lines => [$caller[2]],
25 code => $_[0],
26 );
27 }
28  
29 2 1;
30 __END__
« Compare/Condition.pm ↑ Summary