line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Finance::Bank::SentinelBenefits::Csv401kConverter::Line; |
2
|
|
|
|
|
|
|
$Finance::Bank::SentinelBenefits::Csv401kConverter::Line::VERSION = '1.3'; |
3
|
10
|
|
|
10
|
|
1684
|
use Modern::Perl; |
|
10
|
|
|
|
|
24
|
|
|
10
|
|
|
|
|
114
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 NAME |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
Finance::Bank::SentinelBenefits::Csv401kConverter::Line - stores |
10
|
|
|
|
|
|
|
one line of data from a Sentinel Benefits spreadsheet. |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 VERSION |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
version 1.3 |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 SYNOPSIS |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
This class represents one transaction, whether a contribution or |
23
|
|
|
|
|
|
|
a company match, and tells you the security, the price, quantity, |
24
|
|
|
|
|
|
|
total money, etc. It doesn't have any smarts, but serves as an |
25
|
|
|
|
|
|
|
immutable internal data structure. |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=cut |
30
|
|
|
|
|
|
|
|
31
|
10
|
|
|
10
|
|
3247
|
use Moose; |
|
10
|
|
|
|
|
930906
|
|
|
10
|
|
|
|
|
81
|
|
32
|
|
|
|
|
|
|
|
33
|
10
|
|
|
10
|
|
74973
|
use Finance::Bank::SentinelBenefits::Csv401kConverter::Types; |
|
10
|
|
|
|
|
34
|
|
|
10
|
|
|
|
|
1801
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head1 Constructor |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head2 new() |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
my $l = Finance::Bank::SentinelBenefits::Csv401kConverter::Line->new( |
44
|
|
|
|
|
|
|
date => $date, |
45
|
|
|
|
|
|
|
symbol => $symbol, |
46
|
|
|
|
|
|
|
memo => $memo, |
47
|
|
|
|
|
|
|
quantity => $quantity, |
48
|
|
|
|
|
|
|
price => $price, |
49
|
|
|
|
|
|
|
total => $total, |
50
|
|
|
|
|
|
|
source => $source, |
51
|
|
|
|
|
|
|
side => $side, |
52
|
|
|
|
|
|
|
); |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=cut |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 Accessors |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head2 $l->date() |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
The date of the transaction |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=cut |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
has 'date' => ( |
71
|
|
|
|
|
|
|
is => 'ro', |
72
|
|
|
|
|
|
|
isa => 'DateTime', |
73
|
|
|
|
|
|
|
required => 1, |
74
|
|
|
|
|
|
|
); |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head2 $l->symbol() |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
The symbol of the transaction |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=cut |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
has 'symbol' => ( |
87
|
|
|
|
|
|
|
is => 'ro', |
88
|
|
|
|
|
|
|
isa => 'Str', |
89
|
|
|
|
|
|
|
required => 1, |
90
|
|
|
|
|
|
|
); |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head2 $l->memo() |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
The memo of the transaction |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=cut |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
has 'memo' => ( |
103
|
|
|
|
|
|
|
is => 'ro', |
104
|
|
|
|
|
|
|
isa => 'Str', |
105
|
|
|
|
|
|
|
required => 1, |
106
|
|
|
|
|
|
|
); |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=head2 $l->quantity() |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
The quantity of the transaction, can be franctional |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=cut |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
has 'quantity' => ( |
119
|
|
|
|
|
|
|
is => 'ro', |
120
|
|
|
|
|
|
|
isa => 'Num', |
121
|
|
|
|
|
|
|
required => 1, |
122
|
|
|
|
|
|
|
); |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
=head2 $l->price() |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
The price of the transaction |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
=cut |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
has 'price' => ( |
135
|
|
|
|
|
|
|
is => 'ro', |
136
|
|
|
|
|
|
|
isa => 'Num', |
137
|
|
|
|
|
|
|
required => 1, |
138
|
|
|
|
|
|
|
); |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
=head2 $l->total() |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
The total of the transaction |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
=cut |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
has 'total' => ( |
151
|
|
|
|
|
|
|
is => 'ro', |
152
|
|
|
|
|
|
|
isa => 'Num', |
153
|
|
|
|
|
|
|
required => 1, |
154
|
|
|
|
|
|
|
); |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
=head2 $l->source() |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
The source of the transaction |
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
=cut |
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
has 'source' => ( |
167
|
|
|
|
|
|
|
is => 'ro', |
168
|
|
|
|
|
|
|
isa => 'ContributionSource', |
169
|
|
|
|
|
|
|
required => 1, |
170
|
|
|
|
|
|
|
); |
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
has 'side' => ( |
173
|
|
|
|
|
|
|
is => 'ro', |
174
|
|
|
|
|
|
|
isa => 'TradeSide', |
175
|
|
|
|
|
|
|
required => 1, |
176
|
|
|
|
|
|
|
); |
177
|
|
|
|
|
|
|
|
178
|
10
|
|
|
10
|
|
100
|
no Moose; |
|
10
|
|
|
|
|
40
|
|
|
10
|
|
|
|
|
111
|
|
179
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
|
183
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
184
|
|
|
|
|
|
|
Copyright 2009-2023 David Solimano |
185
|
|
|
|
|
|
|
This file is part of Finance::Bank::SentinelBenefits::Csv401kConverter |
186
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
Finance::Bank::SentinelBenefits::Csv401kConverter is free software: you can redistribute it and/or modify |
188
|
|
|
|
|
|
|
it under the terms of the GNU General Public License as published by |
189
|
|
|
|
|
|
|
the Free Software Foundation, either version 3 of the License, or |
190
|
|
|
|
|
|
|
(at your option) any later version. |
191
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
Finance::Bank::SentinelBenefits::Csv401kConverter is distributed in the hope that it will be useful, |
193
|
|
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
194
|
|
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
195
|
|
|
|
|
|
|
GNU General Public License for more details. |
196
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License |
198
|
|
|
|
|
|
|
along with Finance::Bank::SentinelBenefits::Csv401kConverter. If not, see <http://www.gnu.org/licenses/>. |
199
|
|
|
|
|
|
|
=cut |