File Coverage

blib/lib/Oogaboogo/Date.pm
Criterion Covered Total %
statement 9 15 60.0
branch 0 4 0.0
condition 0 6 0.0
subroutine 3 5 60.0
pod 0 2 0.0
total 12 32 37.5


line stmt bran cond sub pod time code
1             package Oogaboogo::Date;
2              
3 1     1   23745 use 5.012004;
  1         4  
  1         41  
4 1     1   6 use strict;
  1         1  
  1         37  
5 1     1   6 use warnings;
  1         16  
  1         317  
6              
7             require Exporter;
8              
9             our @ISA = qw(Exporter);
10              
11             # Items to export into callers namespace by default. Note: do not export
12             # names by default without a very good reason. Use EXPORT_OK instead.
13             # Do not simply export all your public functions/methods/constants.
14              
15             # This allows declaration use Oogaboogo::Date ':all';
16             # If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
17             # will save memory.
18             our %EXPORT_TAGS = ( 'all' => [ qw(
19            
20             ) ] );
21              
22             our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
23              
24             our @EXPORT = qw(
25             day mon
26             );
27              
28             our $VERSION = '0.01';
29              
30              
31             # Preloaded methods go here.
32              
33             my @day = qw(ark dip wap sen pop sep kir);
34             my @mon = qw(diz pod bod rod sip wax lin sen kun fiz nap dep);
35              
36             sub day {
37 0     0 0   my $num = shift @_;
38 0 0 0       die "$num is not a valid day number" unless 0 <= $num and $num <= 6;
39 0           $day[$num];
40             }
41              
42             sub mon {
43 0     0 0   my $num = shift @_;
44 0 0 0       die "$num is not a valid month" unless 0 <= $num and $num <= 11;
45 0           $mon[$num];
46             }
47              
48             1;
49             __END__