File Coverage

blib/lib/Crypto/ECC/CurveFp.pm
Criterion Covered Total %
statement 3 8 37.5
branch 0 4 0.0
condition n/a
subroutine 1 2 50.0
pod 0 1 0.0
total 4 15 26.6


line stmt bran cond sub pod time code
1             package Crypto::ECC::CurveFp;
2             $Crypto::ECC::CurveFp::VERSION = '0.004';
3 2     2   1099 use Moo;
  2         11362  
  2         9  
4              
5             with "Object::GMP";
6              
7             has a => ( is => 'ro' );
8             has b => ( is => 'ro' );
9             has prime => ( is => 'ro' );
10              
11             around BUILDARGS => __PACKAGE__->BUILDARGS_val2gmp(qw(prime));
12              
13             sub cmp {
14 0     0 0   my ( $class, $p1, $p2 ) = @_;
15              
16 0           my $same;
17              
18 0 0         return 1 if ( $p1->a <=> $p2->a ) != 0;
19              
20 0 0         return 1 if ( $p1->b <=> $p2->b ) != 0;
21              
22 0           return ( $p1->prime <=> $p2->prime ) != 0;
23             }
24              
25             1;