line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Finance::AMEX::Transaction::CBNOT::Base; |
2
|
|
|
|
|
|
|
$Finance::AMEX::Transaction::CBNOT::Base::VERSION = '0.004'; |
3
|
8
|
|
|
8
|
|
65
|
use strict; |
|
8
|
|
|
|
|
17
|
|
|
8
|
|
|
|
|
247
|
|
4
|
8
|
|
|
8
|
|
43
|
use warnings; |
|
8
|
|
|
|
|
23
|
|
|
8
|
|
|
|
|
1951
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
# ABSTRACT: Parse AMEX Chargeback Notification Files (CBNOT) Base methods |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new { |
9
|
6
|
|
|
6
|
1
|
29
|
my ($class, %props) = @_; |
10
|
|
|
|
|
|
|
my $self = bless { |
11
|
|
|
|
|
|
|
_line => $props{line}, |
12
|
6
|
|
|
|
|
27
|
}, $class; |
13
|
|
|
|
|
|
|
|
14
|
6
|
|
|
|
|
28
|
return $self; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub line { |
18
|
0
|
|
|
0
|
1
|
0
|
my ($self) = @_; |
19
|
0
|
|
|
|
|
0
|
return $self->{_line}; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub _get_column { |
23
|
294
|
|
|
294
|
|
746
|
my ($self, $field) = @_; |
24
|
294
|
|
|
|
|
805
|
my $map = $self->field_map->{$field}; |
25
|
|
|
|
|
|
|
|
26
|
294
|
|
|
|
|
4672
|
my $ret = substr($self->{_line}, $map->[0] - 1, $map->[1]); |
27
|
294
|
|
|
|
|
1640
|
$ret =~ s{\s+\z}{}; |
28
|
294
|
|
|
|
|
1836
|
return $ret; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub REC_TYPE { |
32
|
4
|
|
|
4
|
1
|
1114
|
my ($self) = @_; |
33
|
4
|
|
|
|
|
18
|
return $self->_get_column('REC_TYPE'); |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
__END__ |