File Coverage

blib/lib/Data/Conveyor/YAML/Marshall/Ticket.pm
Criterion Covered Total %
statement 16 21 76.1
branch n/a
condition 0 3 0.0
subroutine 6 7 85.7
pod 1 1 100.0
total 23 32 71.8


line stmt bran cond sub pod time code
1 1     1   19 use 5.008;
  1         4  
  1         45  
2 1     1   6 use strict;
  1         2  
  1         42  
3 1     1   6 use warnings;
  1         2  
  1         66  
4              
5             package Data::Conveyor::YAML::Marshall::Ticket;
6             BEGIN {
7 1     1   22 $Data::Conveyor::YAML::Marshall::Ticket::VERSION = '1.103130';
8             }
9             # ABSTRACT: Stage-based conveyor-belt-like ticket handling system
10 1     1   973 use YAML::Marshall 'ticket';
  1         529  
  1         6  
11 1     1   58 use parent 'Class::Scaffold::YAML::Marshall';
  1         2  
  1         7  
12              
13             sub yaml_load {
14 0     0 1   my $self = shift;
15 0           my $node = $self->SUPER::yaml_load(@_);
16 0           my %args = %$node;
17 0           delete @args{qw/ticket_no prefix suffix/};
18 0   0       { ticket_no => $node->{ticket_no}
19             || $self->delegate->make_obj('test_ticket')->gen_temp_ticket_no(
20             prefix => $node->{prefix},
21             suffix => $node->{suffix},
22             ),
23             %args,
24             };
25             }
26             1;
27              
28              
29             __END__