line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Finance::Tax::Aruba::Income; |
2
|
|
|
|
|
|
|
our $VERSION = '0.007'; |
3
|
4
|
|
|
4
|
|
415480
|
use warnings; |
|
4
|
|
|
|
|
47
|
|
|
4
|
|
|
|
|
121
|
|
4
|
4
|
|
|
4
|
|
26
|
use strict; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
91
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
# ABSTRACT: Income tax calculations for Aruba |
7
|
|
|
|
|
|
|
|
8
|
4
|
|
|
4
|
|
19
|
use Carp qw(croak); |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
220
|
|
9
|
4
|
|
|
4
|
|
26
|
use List::Util qw(first); |
|
4
|
|
|
|
|
14
|
|
|
4
|
|
|
|
|
344
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
use Module::Pluggable |
12
|
4
|
|
|
|
|
25
|
require => 1, |
13
|
|
|
|
|
|
|
sub_name => '_plugins', |
14
|
|
|
|
|
|
|
search_path => 'Finance::Tax::Aruba::Income', |
15
|
4
|
|
|
4
|
|
1892
|
; |
|
4
|
|
|
|
|
43178
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
our @years; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub _years { |
20
|
24
|
100
|
|
24
|
|
125
|
return @years if @years; |
21
|
4
|
|
|
|
|
32
|
@years = shift->_plugins; |
22
|
4
|
|
|
|
|
6818
|
return @years; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub tax_year { |
26
|
24
|
|
|
24
|
1
|
87919
|
my ($self, $year, @args) = @_; |
27
|
|
|
|
|
|
|
|
28
|
24
|
|
|
|
|
116
|
my @years = $self->_years(); |
29
|
24
|
|
|
52
|
|
201
|
my $module = first { $_->is_year($year) } @years; |
|
52
|
|
|
|
|
249
|
|
30
|
24
|
50
|
|
|
|
1088
|
return $module->new(@args) if $module; |
31
|
0
|
|
|
|
|
|
croak("Unable to find module for year $year"); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
1; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
__END__ |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=pod |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=encoding UTF-8 |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 NAME |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
Finance::Tax::Aruba::Income - Income tax calculations for Aruba |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 VERSION |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
version 0.007 |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 SYNOPSIS |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
use Finance::Tax::Aruba::Income; |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
my %opts = ( |
55
|
|
|
|
|
|
|
income => 7000 |
56
|
|
|
|
|
|
|
); |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
my $calc = Finance::Tax::Aruba::Income->tax_year(2020, %opts); |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 DESCRIPTION |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
Factory for tax calculations |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 SUPPORTED YEARS |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Currently only the year 2020 is supported. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 METHODS |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head2 tax_year |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
Factory method to create the correct calculator for a given tax year |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 AUTHOR |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
Wesley Schwengle <waterkip@cpan.org> |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
This software is Copyright (c) 2020 by Wesley Schwengle. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
This is free software, licensed under: |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
The (three-clause) BSD License |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=cut |