| 1 | 1 | ▶ | use 5.008; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 2 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | |||||||||||
| 5 | package Data::Conveyor::Ticket::Payload::Common; | ||||||||||
| 6 | 1 | ▶ | BEGIN { | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 1 | $Data::Conveyor::Ticket::Payload::Common::VERSION = '1.103130'; | |||||||||
| 8 | } | ||||||||||
| 9 | # ABSTRACT: Stage-based conveyor-belt-like ticket handling system | ||||||||||
| 10 | |||||||||||
| 11 | 1 | ▶ | use parent 'Data::Conveyor::Ticket::Payload::Item'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 12 | 1 | __PACKAGE__->mk_scalar_accessors(qw(log_level))->mk_framework_object_accessors( | |||||||||
| 13 | value_ticket_rc => 'default_rc', | ||||||||||
| 14 | value_ticket_status => 'default_status', | ||||||||||
| 15 | ); | ||||||||||
| 16 | |||||||||||
| 17 | 0 | ▶ | sub DEFAULTS { | ||||||||
|
Subroutine
DEFAULTS: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 18 | 0 | ( default_rc => $_[0]->delegate->RC_OK, | |||||||||
| 19 | default_status => $_[0]->delegate->TS_RUNNING, | ||||||||||
| 20 | ); | ||||||||||
| 21 | } | ||||||||||
| 22 | 0 | ▶ | sub check { } | ||||||||
|
Subroutine
check: not called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 23 | |||||||||||
| 24 | # A stage can set the default rc (barring any exceptions) in the common | ||||||||||
| 25 | # payload item's; it will be applied in rc(). Ditto for status(). | ||||||||||
| 26 | 0 | ▶ | sub rc { | ||||||||
|
Subroutine
rc: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 27 | 0 | my ($self, $ticket) = @_; | |||||||||
| 28 | 0 | my $rc = $self->SUPER::rc($ticket); | |||||||||
| 29 | 0 | ▶ | $rc += $self->default_rc if defined $self->default_rc; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 30 | } | ||||||||||
| 31 | |||||||||||
| 32 | 0 | ▶ | sub status { | ||||||||
|
Subroutine
status: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 33 | 0 | my ($self, $ticket) = @_; | |||||||||
| 34 | 0 | my $status = $self->SUPER::status($ticket); | |||||||||
| 35 | 0 | ▶ | $status += $self->default_status if defined $self->default_status; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 36 | } | ||||||||||
| 37 | 1 | 1; | |||||||||
| 38 | |||||||||||
| 39 | |||||||||||
| 40 | __END__ | ||||||||||