| 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
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
| |||||||||||||||||||||
| 25 | || ( $self->idx() <=> $other->idx() ) ); | ||||||||||||||||||||
| 26 | } | ||||||||||||||||||||
| 27 | |||||||||||||||||||||
| 28 | 1 | 1; | |||||||||||||||||||
| 29 | |||||||||||||||||||||
| 30 | __END__ | ||||||||||||||||||||