blib/lib/DBIO/DeploymentHandler/HandlesVersioning.pm

filter: Statementstmt 95.2% 20 / 21 Branchbran 50.0% 2 / 4 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 77.7% 28 / 36 CC 4 SCAR 11.9
CC
4
Cov
79%
assert_implemented
5.6
BEGIN
1.0
BEGIN
1.0
CRAP 3.3
« blib/lib/DBIO/DeploymentHandler/HandlesVersionStorage.pm ↑ Summary blib/lib/DBIO/Storage/Composed.pm »
1 package DBIO::DeploymentHandler::HandlesVersioning;
2 # ABSTRACT: Interface for version methods
3  
4 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 3 our $VERSION = '0.900007';
8  
9 3 ▶use DBIO::Exception;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 3 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13  
14 3 my @REQUIRED = qw(
15 next_version_set
16 previous_version_set
17 );
18  
19 8 ▶sub assert_implemented {
Subroutine assert_implemented: called CC=4 SCAR=17.2
Pod documented
20 8 my ($class, $target) = @_;
21  
22 8 ▶ DBIO::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
unless defined $target 0 8 8
23 "$class->assert_implemented called without a target object"
24 ) unless defined $target;
25  
26 8 my @missing = grep { !$target->can($_) } @REQUIRED;
27  
28 8 ▶ return 1 unless @missing;
Branch: 1 branch
BranchTrueFalseTotal
unless @missing 8 0 8
29  
30 0 ▶ DBIO::Exception->throw(
Condition0%0/3
ref $target || $target
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $target || $target
ref $target $target
Truth table0%0/3
A || B
A= ref $targetB= $target
ABresult
1X1
011
000
31 (ref($target) || $target)
32 . " does not implement the $class interface: missing method(s) "
33 . join(', ', @missing)
34 );
35 }
36  
37 3 1;
38  
39 # vim: ts=2 sw=2 expandtab
40  
41 __END__
« blib/lib/DBIO/DeploymentHandler/HandlesVersionStorage.pm ↑ Summary blib/lib/DBIO/Storage/Composed.pm »