bin/hpkp_pin_sha256

filter: Statementstmt 86.2% 25 / 29 Branchbran 30.0% 3 / 10 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 85.7% 6 / 7 Podpod n/a totaltotal 73.9% 34 / 46 CC 2 SCAR 8.1
CC
2
Cov
72%
usage
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.2
« blib/lib/HTTP/PublicKeyPins.pm ↑ Summary
1 #! /usr/bin/perl
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use English qw( -no_match_vars );
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use HTTP::PublicKeyPins();
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use Getopt::Long();
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use Pod::Usage();
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 our $VERSION = 0.03;
11  
12 MAIN: {
13 1 my %options;
14 1 Getopt::Long::GetOptions( \%options, 'help', 'version' );
15 1 ▶ if ( $options{'help'} ) {
Branch: 2 branches
BranchTrueFalseTotal
if ($options{'help'}) { } 0 1 1
elsif ($options{'version'}) { } 0 1 1
16 0 Pod::Usage::pod2usage( -verbose => 1 );
17 }
18 elsif ( $options{version} ) {
19 0 ▶ print "Version $VERSION\n"
Branch: 1 branch
BranchTrueFalseTotal
print "Version $main::VERSION\n" or Carp::croak("Failed to print to STDOUT:$main::EXTENDED_OS_ERROR") 0 0 0
20 or Carp::croak("Failed to print to STDOUT:$EXTENDED_OS_ERROR");
21 }
22 1 foreach my $path (@ARGV) {
23 1 ▶ print HTTP::PublicKeyPins::pin_sha256($path) . "\n"
Branch: 1 branch
BranchTrueFalseTotal
print HTTP::PublicKeyPins::pin_sha256($path) . "\n" or Carp::croak("Failed to print to STDOUT:$main::EXTENDED_OS_ERROR") 1 0 1
24 or Carp::croak("Failed to print to STDOUT:$EXTENDED_OS_ERROR");
25 }
26 }
27  
28 0 ▶sub usage {
Subroutine usage: not called CC=2 SCAR=17.9
29 0 ▶ print
Branch: 1 branch
BranchTrueFalseTotal
print "Usage: $main::PROGRAM_NAME [--help] [--version] path_to_(certificate|certificate_request|public_key)\n\n" or Carp::croak("Failed to print to STDOUT:$main::EXTENDED_OS_ERROR") 0 0 0
30 <<"__USAGE__" or Carp::croak("Failed to print to STDOUT:$EXTENDED_OS_ERROR");
31 Usage: $PROGRAM_NAME [--help] [--version] path_to_(certificate|certificate_request|public_key)
32  
33 __USAGE__
34 0 return;
35 }
36 __DATA__
« blib/lib/HTTP/PublicKeyPins.pm ↑ Summary