File Coverage

blib/lib/Business/RO/TaxDeduction/Ranges.pm
Criterion Covered Total %
statement 11 11 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 15 15 100.0


line stmt bran cond sub pod time code
1             package Business::RO::TaxDeduction::Ranges;
2             $Business::RO::TaxDeduction::Ranges::VERSION = '0.011';
3             # ABSTRACT: Deduction ranges by year
4              
5 3     3   89290 use 5.010001;
  3         9  
6 3     3   352 use utf8;
  3         15  
  3         18  
7 3     3   366 use Moo;
  3         8140  
  3         16  
8 3         30 use Business::RO::TaxDeduction::Types qw(
9             Int
10 3     3   2163 );
  3         8  
11             with qw(Business::RO::TaxDeduction::Role::Utils);
12              
13             has 'vbl_min' => (
14             is => 'ro',
15             isa => Int,
16             lazy => 1,
17             default => sub {
18             my $self = shift;
19             return 1000 if $self->base_year == 2005;
20             return 1500 if $self->base_year == 2016;
21             die "Not a valid year: " . $self->base_year;
22             },
23             );
24              
25             has 'vbl_max' => (
26             is => 'ro',
27             isa => Int,
28             lazy => 1,
29             default => sub {
30             my $self = shift;
31             return 3000 if $self->base_year == 2005;
32             return 3000 if $self->base_year == 2016;
33             die "Not a valid year: " . $self->base_year;
34             },
35             );
36              
37             has 'f_min' => (
38             is => 'ro',
39             isa => Int,
40             lazy => 1,
41             default => sub {
42             my $self = shift;
43             return 1000 if $self->base_year == 2005;
44             return 1500 if $self->base_year == 2016;
45             die "Not a valid year: " . $self->base_year;
46             },
47             );
48              
49             has 'f_max' => (
50             is => 'ro',
51             isa => Int,
52             lazy => 1,
53             default => sub {
54             my $self = shift;
55             return 2000 if $self->base_year == 2005;
56             return 1500 if $self->base_year == 2016;
57             die "Not a valid year: " . $self->base_year;
58             },
59             );
60              
61             1;
62              
63             __END__