blib/lib/Crypt/OpenSSL/Common.pm

filter: Statementstmt 82.6% 19 / 23 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod n/a totaltotal 76.6% 23 / 30 CC 2 SCAR 9.8
CC
2
Cov
76%
new_from_file
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.7
↑ Summary Common.xs »
1 package Crypt::OpenSSL::Common;
2  
3 1 ▶use 5.008008;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 our $VERSION = '0.1';
8  
9 1 require Exporter;
10 1 our @EXPORT = qw();
11 1 our @EXPORT_OK = qw(get_error error_string version version_atbuild);
12 1 our %EXPORT_TAGS = (
13 all => [@EXPORT_OK]
14 );
15 1 *export = \&Exporter::export;
16  
17 1 ▶sub import {
Subroutine import: called CC=1 SCAR=0.0
18 1 load_crypto_strings();
19 1 Exporter::export_to_level(__PACKAGE__, 1, @_);
20 }
21  
22 # A missing C::O::RSA method
23 0 ▶sub Crypt::OpenSSL::RSA::new_from_file {
Subroutine new_from_file: not called CC=2 SCAR=17.9
24 0 my($proto, $file) = @_;
25 0 ▶ open(my $pkfh, '<', $file) or die "Can't open key file: $!\n";
Branch: 1 branch
BranchTrueFalseTotal
open my $pkfh, "<", $file or die "Can't open key file: $!\n" 0 0 0
26 0 local $/ = undef;
27 0 return $proto->new_private_key(<$pkfh>);
28 }
29  
30 1 require XSLoader;
31 1 XSLoader::load('Crypt::OpenSSL::Common', $VERSION);
32  
33 1 1;
34 __END__
↑ Summary Common.xs »