Synd/Heap/Elem.pm

filter: Statementstmt 85.7% 12 / 14 Branchbran n/a Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 75.0% 3 / 4 Podpod 100% 1 / 1 totaltotal 66.6% 16 / 24 CC 2 SCAR 11.0
CC
2
Cov
71%
cmp
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.0
↑ Summary Synd/App.pm »
1 package XML::Grammar::Fortune::Synd::Heap::Elem;
2 1 $XML::Grammar::Fortune::Synd::Heap::Elem::VERSION = '0.0400';
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  
6  
7 1 ▶use parent 'Class::Accessor';
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 1 __PACKAGE__->mk_accessors(
10 qw(
11 date
12 id
13 idx
14 file
15 )
16 );
17  
18 # "All problems in computer science can be solved by
19 # adding another level of indirection;"
20 # -- http://en.wikipedia.org/wiki/Abstraction_layer
21 sub cmp
22 0 ▶{
Subroutine cmp: not called CC=2 SCAR=17.9
Pod documented
23 0 my ( $self, $other ) = @_;
24 0 ▶ return ( ( $self->date()->compare( $other->date() ) )
Condition0%0/3
$self->date->compare($other->date) || $self->idx <=> $other->idx
l!l&&r!l&&!r
000
MC/DC0%0/2
$self->date->compare($other->date) || $self->idx <=> $other->idx
$self->date->compare($other->date) $self->idx <=> $other->idx
Truth table0%0/3
A || B
A= $self->date->compare($other->date)B= $self->idx <=> $other->idx
ABresult
1X1
011
000
25 || ( $self->idx() <=> $other->idx() ) );
26 }
27  
28 1 1;
29  
30 __END__
↑ Summary Synd/App.pm »