blib/lib/App/prefixintsumcol.pm

filter: Statementstmt 95.8% 23 / 24 Branchbran 75.0% 3 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 100% 2 / 2 totaltotal 94.4% 34 / 36 CC 3 SCAR 5.7
CC
3
Cov
93%
run
3.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.8
↑ Summary bin/prefixintsumcol »
1 package App::prefixintsumcol;
2 2 $App::prefixintsumcol::VERSION = '0.0.1';
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 ▶use Math::GMP ();
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 sub new
9 1 ▶{
Subroutine new: called CC=1 SCAR=0.0
Pod documented
10 1 my $class = shift;
11  
12 1 my $self = bless {}, $class;
13  
14 1 $self->_init(@_);
15  
16 1 return $self;
17 }
18  
19 sub _init
20 1 ▶{
Subroutine _init: called CC=1 SCAR=0.0
21 1 my ( $self, $args ) = @_;
22  
23 1 return;
24 }
25  
26 sub run
27 1 ▶{
Subroutine run: called CC=3 SCAR=11.2
Pod documented
28 1 my $s = Math::GMP->new('0');
29  
30 1 ▶ while ( my $l = <ARGV> )
Branch: 1 branch
BranchTrueFalseTotal
if (defined(my $l = readline ARGV)) 3 1 4
31 {
32 3 chomp $l;
33 3 ▶ if ( my ($diff) = ( $l =~ m#\A([0-9]+)(?:\s|\Z)# ) )
Branch: 1 branch
BranchTrueFalseTotal
if (my($diff) = $l =~ /\A([0-9]+)(?:\s|\Z)/) { } 3 0 3
34 {
35 3 printf( "%s\t%s\n", ( $s += Math::GMP->new($diff) ), $l );
36 }
37 else
38 {
39 0 die "Line '$l' at $. does not start with an integer number.";
40 }
41 }
42  
43 1 return;
44 }
45  
46 2 1;
47  
48 __END__
↑ Summary bin/prefixintsumcol »