File Coverage

blib/lib/Date/Holidays/Adapter/KR.pm
Criterion Covered Total %
statement 15 22 68.1
branch 0 2 0.0
condition n/a
subroutine 5 7 71.4
pod 2 2 100.0
total 22 33 66.6


line stmt bran cond sub pod time code
1             package Date::Holidays::Adapter::KR;
2              
3 1     1   266215 use strict;
  1         2  
  1         47  
4 1     1   7 use warnings;
  1         2  
  1         83  
5 1     1   11 use vars qw($VERSION);
  1         2  
  1         57  
6 1     1   6 use Carp;
  1         3  
  1         113  
7              
8 1     1   7 use base 'Date::Holidays::Adapter';
  1         2  
  1         700  
9              
10             $VERSION = '1.35';
11              
12             sub holidays {
13 0     0 1   croak "holidays is unimplemented for ".__PACKAGE__;
14             }
15              
16             sub is_holiday {
17 0     0 1   my ($self, %params) = @_;
18              
19 0           my $sub = $self->{_adaptee}->can('is_fr_holiday');
20              
21 0 0         if ($sub) {
22 0           return &{$sub}($params{'year'}, $params{'month'}, $params{'day'});
  0            
23             } else {
24 0           return;
25             }
26             }
27              
28             1;
29              
30             __END__
31              
32             =pod
33              
34             =encoding UTF-8
35              
36             =head1 NAME
37              
38             Date::Holidays::Adapter::KR - an adapter class for Date::Holidays::KR
39              
40             =head1 VERSION
41              
42             This POD describes version 1.35 of Date::Holidays::Adapter::KR
43              
44             =head1 DESCRIPTION
45              
46             The is the adapter class for L<Date::Holidays::KR>.
47              
48             =head1 SUBROUTINES/METHODS
49              
50             =head2 new
51              
52             The constructor, takes a single named argument, B<countrycode>
53              
54             =head2 is_holiday
55              
56             The B<holidays> method, takes 3 named arguments, B<year>, B<month> and B<day>
57              
58             Returns an indication of whether the day is a holiday in the calendar of the
59             country referenced by B<countrycode> in the call to the constructor B<new>.
60              
61             =head2 holidays
62              
63             The B<holidays> method, takes a single named argument, B<year>
64              
65             Returns a reference to a hash holding the calendar of the country referenced by
66             B<countrycode> in the call to the constructor B<new>.
67              
68             The calendar will spand for a year and the keys consist of B<month> and B<day>
69             concatenated.
70              
71             =head1 DIAGNOSTICS
72              
73             Please refer to DIAGNOSTICS in L<Date::Holidays>
74              
75             =head1 DEPENDENCIES
76              
77             =over
78              
79             =item * L<Date::Holidays::PT>
80              
81             =item * L<Date::Holidays::Adapter>
82              
83             =back
84              
85             =head1 INCOMPATIBILITIES
86              
87             Please refer to INCOMPATIBILITIES in L<Date::Holidays>
88              
89             =head1 BUGS AND LIMITATIONS
90              
91             I am experiecing some issues, with this module, I have not had
92             the time to test it thoroughly.
93              
94             =head1 BUG REPORTING
95              
96             Please refer to BUG REPORTING in L<Date::Holidays>
97              
98             =head1 AUTHOR
99              
100             Jonas Brømsø, (jonasbn) - C<< <jonasbn@cpan.org> >>
101              
102             =head1 LICENSE AND COPYRIGHT
103              
104             L<Date::Holidays> and related modules are (C) by Jonas Brømsø, (jonasbn)
105             2004-2024
106              
107             Date-Holidays and related modules are released under the Artistic License 2.0
108              
109             =cut