| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Business::NAB::Australian::DirectEntry::Returns; |
|
2
|
|
|
|
|
|
|
$Business::NAB::Australian::DirectEntry::Returns::VERSION = '0.03'; |
|
3
|
|
|
|
|
|
|
=head1 NAME |
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
Business::NAB::Australian::DirectEntry::Returns |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
use Business::NAB::Australian::DirectEntry::Returns; |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
# parse: |
|
12
|
|
|
|
|
|
|
my $Returns = Business::NAB::Australian::DirectEntry::Returns |
|
13
|
|
|
|
|
|
|
->new_from_file( $file_path ); |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
foreach my $DetailRecord ( $Returns->detail_record->@* ) { |
|
16
|
|
|
|
|
|
|
... |
|
17
|
|
|
|
|
|
|
} |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
Class for building/parsing a "Australian Direct Entry Payments" |
|
22
|
|
|
|
|
|
|
returns file. This class extends L<Business::NAB::Australian::DirectEntry::Payments> |
|
23
|
|
|
|
|
|
|
so see that for more detail |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=cut |
|
26
|
|
|
|
|
|
|
|
|
27
|
1
|
|
|
1
|
|
1127403
|
use strict; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
43
|
|
|
28
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
84
|
|
|
29
|
1
|
|
|
1
|
|
9
|
use feature qw/ signatures /; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
156
|
|
|
30
|
|
|
|
|
|
|
|
|
31
|
1
|
|
|
1
|
|
674
|
use Moose; |
|
|
1
|
|
|
|
|
542431
|
|
|
|
1
|
|
|
|
|
8
|
|
|
32
|
|
|
|
|
|
|
extends 'Business::NAB::Australian::DirectEntry::Payments'; |
|
33
|
1
|
|
|
1
|
|
9972
|
no warnings qw/ experimental::signatures /; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
289
|
|
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
# we have long namespaces and use them multiple times so have |
|
36
|
|
|
|
|
|
|
# normalised them out into the $parent and @subclasses below |
|
37
|
|
|
|
|
|
|
my $parent = 'Business::NAB::Australian::DirectEntry::Returns'; |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
my @subclasses = ( |
|
40
|
|
|
|
|
|
|
qw/ |
|
41
|
|
|
|
|
|
|
DescriptiveRecord |
|
42
|
|
|
|
|
|
|
DetailRecord |
|
43
|
|
|
|
|
|
|
TotalRecord |
|
44
|
|
|
|
|
|
|
/ |
|
45
|
|
|
|
|
|
|
); |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
__PACKAGE__->load_attributes( $parent, @subclasses ); |
|
48
|
|
|
|
|
|
|
|
|
49
|
1
|
|
|
1
|
1
|
3346
|
sub new_from_file ( $class, $file ) { |
|
|
1
|
|
|
|
|
4
|
|
|
|
1
|
|
|
|
|
4
|
|
|
|
1
|
|
|
|
|
3
|
|
|
50
|
|
|
|
|
|
|
|
|
51
|
1
|
|
|
|
|
36
|
my %sub_class_map = ( |
|
52
|
|
|
|
|
|
|
0 => 'DescriptiveRecord', |
|
53
|
|
|
|
|
|
|
2 => 'DetailRecord', # returns |
|
54
|
|
|
|
|
|
|
7 => 'TotalRecord', # returns |
|
55
|
|
|
|
|
|
|
); |
|
56
|
|
|
|
|
|
|
|
|
57
|
1
|
|
|
|
|
75
|
my $self = $class->new; |
|
58
|
|
|
|
|
|
|
|
|
59
|
1
|
|
|
|
|
14
|
return $self->SUPER::new_from_file( |
|
60
|
|
|
|
|
|
|
$file, \%sub_class_map, $parent |
|
61
|
|
|
|
|
|
|
); |
|
62
|
|
|
|
|
|
|
} |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
L<Business::NAB::Australian::DirectEntry::Payments> |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=cut |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |