| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
1
|
|
|
1
|
|
730
|
use 5.008; |
|
|
1
|
|
|
|
|
5
|
|
|
|
1
|
|
|
|
|
43
|
|
|
2
|
1
|
|
|
1
|
|
8
|
use strict; |
|
|
1
|
|
|
|
|
5
|
|
|
|
1
|
|
|
|
|
35
|
|
|
3
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
47
|
|
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Data::Conveyor::Service::Result; |
|
6
|
|
|
|
|
|
|
BEGIN { |
|
7
|
1
|
|
|
1
|
|
18
|
$Data::Conveyor::Service::Result::VERSION = '1.103130'; |
|
8
|
|
|
|
|
|
|
} |
|
9
|
|
|
|
|
|
|
# ABSTRACT: Stage-based conveyor-belt-like ticket handling system |
|
10
|
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
7
|
use YAML; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
65
|
|
|
12
|
|
|
|
|
|
|
use overload |
|
13
|
1
|
|
|
|
|
7
|
'""' => 'stringify', |
|
14
|
1
|
|
|
1
|
|
7
|
fallback => 1; |
|
|
1
|
|
|
|
|
5
|
|
|
15
|
1
|
|
|
1
|
|
78
|
use parent 'Data::Conveyor::Service'; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
7
|
|
|
16
|
|
|
|
|
|
|
__PACKAGE__->mk_scalar_accessors(qw(result exception)); |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub is_ok { |
|
19
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
20
|
0
|
|
|
|
|
|
my $E = $self->exception; |
|
21
|
0
|
|
0
|
|
|
|
!(defined $E && ref $E); |
|
22
|
|
|
|
|
|
|
} |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub stringify { |
|
25
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
26
|
0
|
0
|
|
|
|
|
return sprintf("%s\n", $self->exception) unless $self->is_ok; |
|
27
|
0
|
|
|
|
|
|
$self->result_as_string; |
|
28
|
|
|
|
|
|
|
} |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
# dummy; subclasses should override this |
|
31
|
0
|
|
|
0
|
1
|
|
sub result_as_string { sprintf "%s" => $_[0]->result } |
|
32
|
|
|
|
|
|
|
1; |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
__END__ |