blib/lib/Web/ID/RSAKey.pm

filter: Statementstmt 100% 28 / 28 Branchbran 50.0% 3 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod 100% 1 / 1 totaltotal 93.0% 40 / 43 CC 5 SCAR 10.4
CC
5
Cov
91%
rsa_equal
5.4
BEGIN
1.0
BEGIN
1.0
CRAP 2.8
« lib/Web/ID/Util/FindOpenSSL.pm ↑ Summary blib/lib/Web/ID/Certificate.pm »
1 package Web::ID::RSAKey;
2  
3 3 ▶use 5.010;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 3 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
7 3 $Web::ID::RSAKey::AUTHORITY = 'cpan:TOBYINK';
8 3 $Web::ID::RSAKey::VERSION = '1.927';
9 }
10  
11 3 ▶use Web::ID::Types -types;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 3 ▶use Web::ID::Util;
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 3 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 3 ▶use namespace::sweep;
Subroutine BEGIN: called CC=1 SCAR=0.0
16  
17 3 for (qw( exponent modulus ))
18 {
19 6 has $_ => (
20 is => read_only,
21 isa => Bigint,
22 required => true,
23 coerce => true,
24 );
25 }
26  
27 sub rsa_equal
28 5 ▶{
Subroutine rsa_equal: called CC=5 SCAR=16.8
Pod documented
29 5 my ($self, $other) = @_;
30
31 5 foreach (qw(exponent modulus))
32 {
33 10 ▶ my $m1 = $self->can($_) or return;
Branch: 1 branch
BranchTrueFalseTotal
my $m1 = $self->can($_) or return 10 0 10
34 10 ▶ my $m2 = $other->can($_) or return;
Branch: 1 branch
BranchTrueFalseTotal
my $m2 = $other->can($_) or return 10 0 10
35 10 ▶ return unless $self->$m1 == $other->$m2;
Branch: 1 branch
BranchTrueFalseTotal
unless $self->$m1 == $other->$m2 0 10 10
36 }
37
38 5 return true;
39 }
40  
41 3 __PACKAGE__
42 __END__
« lib/Web/ID/Util/FindOpenSSL.pm ↑ Summary blib/lib/Web/ID/Certificate.pm »