line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
2
|
|
|
2
|
|
51635
|
use utf8; |
|
2
|
|
|
|
|
10
|
|
|
2
|
|
|
|
|
11
|
|
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
package Net::EGTS::SubRecord::Auth::ResultCode; |
4
|
2
|
|
|
2
|
|
407
|
use Mouse; |
|
2
|
|
|
|
|
20609
|
|
|
2
|
|
|
|
|
9
|
|
5
|
|
|
|
|
|
|
extends qw(Net::EGTS::SubRecord); |
6
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
683
|
use Carp; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
120
|
|
8
|
|
|
|
|
|
|
|
9
|
2
|
|
|
2
|
|
293
|
use Net::EGTS::Util qw(usize); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
80
|
|
10
|
2
|
|
|
2
|
|
291
|
use Net::EGTS::Codes; |
|
2
|
|
|
|
|
82
|
|
|
2
|
|
|
|
|
896
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
# Result Code |
13
|
|
|
|
|
|
|
has RCD => is => 'rw', isa => 'BYTE', default => EGTS_PC_OK; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
after 'decode' => sub { |
16
|
|
|
|
|
|
|
my ($self) = @_; |
17
|
|
|
|
|
|
|
die 'SubRecord not EGTS_SR_RESULT_CODE type' |
18
|
|
|
|
|
|
|
unless $self->SRT == EGTS_SR_RESULT_CODE; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
my $bin = $self->SRD; |
21
|
|
|
|
|
|
|
$self->RCD( $self->nip(\$bin => 'C') ); |
22
|
|
|
|
|
|
|
}; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
before 'encode' => sub { |
25
|
|
|
|
|
|
|
my ($self) = @_; |
26
|
|
|
|
|
|
|
die 'SubRecord not EGTS_SR_RESULT_CODE type' |
27
|
|
|
|
|
|
|
unless $self->SRT == EGTS_SR_RESULT_CODE; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
$self->SRD( pack 'C' => $self->RCD ); |
30
|
|
|
|
|
|
|
}; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
around BUILDARGS => sub { |
33
|
|
|
|
|
|
|
my $orig = shift; |
34
|
|
|
|
|
|
|
my $class = shift; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
# simple scalar decoding support |
37
|
|
|
|
|
|
|
my $bin = @_ % 2 ? shift : undef; |
38
|
|
|
|
|
|
|
my %opts = @_; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
return $class->$orig( bin => $bin, %opts, SRT => EGTS_SR_RESULT_CODE ) |
41
|
|
|
|
|
|
|
if $bin; |
42
|
|
|
|
|
|
|
return $class->$orig( %opts, SRT => EGTS_SR_RESULT_CODE ); |
43
|
|
|
|
|
|
|
}; |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
augment as_debug => sub { |
46
|
|
|
|
|
|
|
my ($self) = @_; |
47
|
2
|
|
|
2
|
|
11
|
use bytes; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
11
|
|
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
my @bytes = ((unpack('B*', $self->SRD)) =~ m{.{8}}g); |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
my @str; |
52
|
|
|
|
|
|
|
push @str => sprintf('RCD: %s', splice @bytes, 0 => usize('C')); |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
return @str; |
55
|
|
|
|
|
|
|
}; |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable(); |