line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
881
|
use 5.008; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
56
|
|
2
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
40
|
|
3
|
1
|
|
|
1
|
|
20
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
76
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Data::Conveyor::Ticket::Payload::Instruction; |
6
|
|
|
|
|
|
|
BEGIN { |
7
|
1
|
|
|
1
|
|
21
|
$Data::Conveyor::Ticket::Payload::Instruction::VERSION = '1.103130'; |
8
|
|
|
|
|
|
|
} |
9
|
|
|
|
|
|
|
# ABSTRACT: Stage-based conveyor-belt-like ticket handling system |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
# ptags: DCTPI |
12
|
1
|
|
|
1
|
|
6
|
use Class::Value; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
15
|
|
13
|
1
|
|
|
1
|
|
39
|
use parent 'Class::Scaffold::Storable'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
10
|
|
14
|
|
|
|
|
|
|
use overload |
15
|
1
|
|
|
|
|
19
|
'eq' => 'eq', |
16
|
1
|
|
|
1
|
|
95
|
'""' => 'stringify'; |
|
1
|
|
|
|
|
2
|
|
17
|
|
|
|
|
|
|
__PACKAGE__ |
18
|
|
|
|
|
|
|
->mk_scalar_accessors(qw(command)) |
19
|
|
|
|
|
|
|
->mk_object_accessors('Class::Value' => 'value'); |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
# Override type() in subclasses. Override value() as well; should be a value |
22
|
|
|
|
|
|
|
# object corresponding to the type of instruction. |
23
|
1
|
|
|
1
|
|
115
|
use constant type => ''; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
246
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub eq { |
26
|
0
|
|
|
0
|
1
|
|
my ($lhs, $rhs) = @_; |
27
|
0
|
|
|
|
|
|
(sprintf "%s", $lhs) eq (sprintf "%s", $rhs); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub stringify { |
31
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
32
|
0
|
|
|
|
|
|
sprintf 'command [%s], type [%s], value [%s]', |
33
|
|
|
|
|
|
|
$self->command, $self->type, $self->value; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub check { |
37
|
0
|
|
|
0
|
1
|
|
my ($self, $exception_container) = @_; |
38
|
0
|
|
|
|
|
|
$self->value->run_checks_with_exception_container($exception_container); |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
1; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
__END__ |