blib/lib/Pod/Extract.pm

filter: Statementstmt 33.6% 39 / 116 Branchbran 2.7% 1 / 36 Conditioncond 0.0% 0 / 22 MC/DCmcdc 0.0% 0 / 14 Subroutinesub 64.7% 11 / 17 Podpod 50.0% 2 / 4 totaltotal 25.3% 53 / 209 CC 26 SCAR 48.7
CC
26
Cov
23%
extract_pod
306.0
cmd_extract
30.0
_write_file
20.0
CRAP 130.5
↑ Summary
1 #!/usr/bin/env perl
2  
3 package Pod::Extract;
4  
5 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 ▶use CLI::Simple::Constants qw(:booleans :chars);
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use CLI::Simple::Utils qw(choose);
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 ▶use Data::Dumper;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 1 ▶use English qw(-no_match_vars);
Subroutine BEGIN: called CC=1 SCAR=0.0
13 1 ▶use IO::Scalar;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 1 ▶use Module::Load;
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 1 our $VERSION = '1.0.0';
17  
18 1 ▶use Readonly;
Subroutine BEGIN: called CC=1 SCAR=0.0
19  
20 1 Readonly our $POD_START => qr/^=(?:pod|begin)/xsm;
21 1 Readonly our $POD_END => qr/^=(?:cut|end)/xsm;
22  
23 1 our @EXPORT = qw(extract_pod);
24  
25 1 ▶use parent qw(CLI::Simple Exporter);
Subroutine BEGIN: called CC=1 SCAR=0.0
26  
27 1 ▶caller or __PACKAGE__->main();
Branch: 1 branch
BranchTrueFalseTotal
caller or __PACKAGE__->main 1 0 1
28  
29 ########################################################################
30 0 ▶sub extract_pod {
Subroutine extract_pod: not called CC=17 SCAR=57.2
Pod documented
31 ########################################################################
32 0 my ( $fh, $options ) = @_;
33  
34 0 ▶ $options //= {};
Condition0%0/2
$options //= {}
l!l
00
MC/DC0%0/1
$options //= {}
$options
Truth table0%0/2
A
A= $options
Aresult
11
00
35  
36 0 my %pod_sections;
37  
38 0 my $start_of_pod = <<'START_OF_POD';
39  
40 __END__
↑ Summary