| 1 | 4 | ▶ | use 5.008; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 2 | 4 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 3 | 4 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | |||||||||||||||||||||
| 5 | package Data::Conveyor::Service::Result; | ||||||||||||||||||||
| 6 | 4 | ▶ | BEGIN { | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 7 | 4 | $Data::Conveyor::Service::Result::VERSION = '1.103130'; | |||||||||||||||||||
| 8 | } | ||||||||||||||||||||
| 9 | # ABSTRACT: Stage-based conveyor-belt-like ticket handling system | ||||||||||||||||||||
| 10 | |||||||||||||||||||||
| 11 | 4 | ▶ | use YAML; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 12 | use overload | ||||||||||||||||||||
| 13 | 4 | ▶ | '""' => 'stringify', | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 14 | 4 | fallback => 1; | |||||||||||||||||||
| 15 | 4 | ▶ | use parent 'Data::Conveyor::Service'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 16 | 4 | __PACKAGE__->mk_scalar_accessors(qw(result exception)); | |||||||||||||||||||
| 17 | |||||||||||||||||||||
| 18 | 0 | ▶ | sub is_ok { | ||||||||||||||||||
|
Subroutine
is_ok: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 19 | 0 | my $self = shift; | |||||||||||||||||||
| 20 | 0 | my $E = $self->exception; | |||||||||||||||||||
| 21 | 0 | ▶ | !(defined $E && ref $E); | ||||||||||||||||||
|
Condition0%0/3
defined $E && ref $E
MC/DC0%0/2
defined $E && ref $E
defined $E
ref $E
Truth table0%0/3
A && B
A= defined $EB= ref $E
| |||||||||||||||||||||
| 22 | } | ||||||||||||||||||||
| 23 | |||||||||||||||||||||
| 24 | 0 | ▶ | sub stringify { | ||||||||||||||||||
|
Subroutine
stringify: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 25 | 0 | my $self = shift; | |||||||||||||||||||
| 26 | 0 | ▶ | return sprintf("%s\n", $self->exception) unless $self->is_ok; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 27 | 0 | $self->result_as_string; | |||||||||||||||||||
| 28 | } | ||||||||||||||||||||
| 29 | |||||||||||||||||||||
| 30 | # dummy; subclasses should override this | ||||||||||||||||||||
| 31 | 0 | ▶ | sub result_as_string { sprintf "%s" => $_[0]->result } | ||||||||||||||||||
|
Subroutine
result_as_string: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 32 | 4 | 1; | |||||||||||||||||||
| 33 | |||||||||||||||||||||
| 34 | |||||||||||||||||||||
| 35 | __END__ | ||||||||||||||||||||