| 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::Transaction::Factory; | ||
| 6 | 1 | ▶ | BEGIN { |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 1 | $Data::Conveyor::Transaction::Factory::VERSION = '1.103130'; | |
| 8 | } | ||
| 9 | # ABSTRACT: Stage-based conveyor-belt-like ticket handling system | ||
| 10 | |||
| 11 | 1 | ▶ | use Error::Hierarchy::Util 'assert_defined'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | 1 | ▶ | use parent 'Class::Scaffold::Factory'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | |||
| 14 | # Subclasses have to override - and therefore define - the mappings of object | ||
| 15 | # types and commands to transaction handler classes. | ||
| 16 | # For the txsel, it's ok if there is no handler for a given situation, so just | ||
| 17 | # map to Class::Null | ||
| 18 | 1 | ▶ | use constant TXSEL_CLASS_FOR_TRANSACTION => (_AUTO => 'Class::Null',); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 19 | |||
| 20 | 0 | ▶ | sub gen_txsel_handler { |
|
Subroutine
gen_txsel_handler: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 21 | 0 | my ($self, $object_type, $command, $context, %args) = @_; | |
| 22 | |||
| 23 | # object_type and command can be normal strings, shouldn't enforce | ||
| 24 | # assert_object_type(). | ||
| 25 | 0 | assert_defined $object_type, 'called without object_type'; | |
| 26 | 0 | assert_defined $command, 'called without command'; | |
| 27 | 0 | assert_defined $context, 'called without context'; | |
| 28 | 0 | $self->gen_handler( | |
| 29 | TXSEL_CLASS_FOR_TRANSACTION => [ $object_type, $command, $context ], | ||
| 30 | %args | ||
| 31 | ); | ||
| 32 | } | ||
| 33 | 1 | 1; | |
| 34 | |||
| 35 | |||
| 36 | __END__ | ||