Policy/Exception.pm

filter: Statementstmt 83.3% 15 / 18 Branchbran n/a Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 87.5% 7 / 8 Podpod 0.0% 0 / 3 totaltotal 68.7% 22 / 32 CC 2 SCAR 7.5
CC
2
Cov
75%
_three_way_compare
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.1
« Policy/Rule/Length.pm ↑ Summary Policy/Rule.pm »
1 package Password::Policy::Exception;
2 13 $Password::Policy::Exception::VERSION = '0.06';
3 13 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 13 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 use overload
7 27 ▶ '""' => sub { shift->error },
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine __ANON__: called CC=1 SCAR=0.0
8 13 'cmp' => \&_three_way_compare;
9  
10  
11 27 ▶sub new { bless {} => shift; }
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
12 1 ▶sub error { return "An unspecified exception was thrown."; }
Subroutine error: called CC=1 SCAR=0.0
Pod undocumented
13 27 ▶sub throw { die shift->new; }
Subroutine throw: called CC=1 SCAR=0.0
Pod undocumented
14  
15 0 ▶sub _three_way_compare {
Subroutine _three_way_compare: not called CC=2 SCAR=17.9
16 0 my $self = shift;
17 0 ▶ my $other = shift || '';
Condition0%0/2
shift() || ''
l!l
00
MC/DC0%0/1
shift() || ''
shift()
Truth table0%0/2
A
A= shift()
Aresult
11
00
18 0 return $self->error cmp "$other";
19 }
20  
21 13 1;
22  
23 __END__
« Policy/Rule/Length.pm ↑ Summary Policy/Rule.pm »