File Coverage

blib/lib/Date/Holidays/GB/SCT.pm
Criterion Covered Total %
statement 16 16 100.0
branch 2 4 50.0
condition n/a
subroutine 6 6 100.0
pod 0 2 0.0
total 24 28 85.7


line stmt bran cond sub pod time code
1              
2             our $VERSION = '0.021'; # VERSION
3              
4             use strict;
5 1     1   397 use warnings;
  1         2  
  1         24  
6 1     1   4  
  1         1  
  1         21  
7             use Date::Holidays::GB;
8 1     1   4  
  1         2  
  1         28  
9             use base qw( Exporter );
10 1     1   4 our @EXPORT_OK = qw(
  1         2  
  1         189  
11             holidays
12             is_holiday
13             );
14              
15             my %args
16             = $_[0] =~ m/\D/
17 1 50   1 0 7 ? @_
18             : ( year => $_[0] );
19              
20             return Date::Holidays::GB::holidays( %args, regions => [ 'SCT' ] );
21             }
22 1         6  
23             my %args
24             = $_[0] =~ m/\D/
25             ? @_
26 1 50   1 0 9 : ( year => $_[0], month => $_[1], day => $_[2] );
27              
28             return Date::Holidays::GB::is_holiday( %args, regions => [ 'SCT' ] );
29             }
30              
31 1         5 1;
32              
33              
34             =head1 NAME
35              
36             Date::Holidays::GB::SCT - Date::Holidays class for GB-SCT (Scotland)
37              
38             =head1 SYNOPSIS
39              
40             use Date::Holidays::GB::SCT qw( holidays is_holiday );
41              
42             # All holidays for Scotland
43             my $holidays = holidays( year => 2013 );
44              
45             if ( is_holiday( year => 2013, month => 12, day => 25 ) ) {
46             print "No work today!";
47             }
48              
49             =cut
50