| 1 | package Oogaboogo::Date; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | 1 | ▶ | use 5.012004; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 1 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | 1 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||
| 7 | 1 | require Exporter; | |||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||
| 9 | 1 | 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 | 1 | our %EXPORT_TAGS = ( 'all' => [ qw( | |||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||
| 20 | ) ] ); | ||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||
| 22 | 1 | our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); | |||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||
| 24 | 1 | our @EXPORT = qw( | |||||||||||||||||||||||||||
| 25 | day mon | ||||||||||||||||||||||||||||
| 26 | ); | ||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||
| 28 | 1 | our $VERSION = '0.01'; | |||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||
| 31 | # Preloaded methods go here. | ||||||||||||||||||||||||||||
| 32 | |||||||||||||||||||||||||||||
| 33 | 1 | my @day = qw(ark dip wap sen pop sep kir); | |||||||||||||||||||||||||||
| 34 | 1 | my @mon = qw(diz pod bod rod sip wax lin sen kun fiz nap dep); | |||||||||||||||||||||||||||
| 35 | |||||||||||||||||||||||||||||
| 36 | 0 | ▶ | sub day { | ||||||||||||||||||||||||||
|
Subroutine
day: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||||||||||
| 37 | 0 | my $num = shift @_; | |||||||||||||||||||||||||||
| 38 | 0 | ▶ | die "$num is not a valid day number" unless 0 <= $num and $num <= 6; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
0 <= $num and $num <= 6
MC/DC0%0/2
0 <= $num and $num <= 6
0 <= $num
$num <= 6
Truth table0%0/3
A and B
A= 0 <= $numB= $num <= 6
| |||||||||||||||||||||||||||||
| 39 | 0 | $day[$num]; | |||||||||||||||||||||||||||
| 40 | } | ||||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||
| 42 | 0 | ▶ | sub mon { | ||||||||||||||||||||||||||
|
Subroutine
mon: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||||||||||
| 43 | 0 | my $num = shift @_; | |||||||||||||||||||||||||||
| 44 | 0 | ▶ | die "$num is not a valid month" unless 0 <= $num and $num <= 11; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
0 <= $num and $num <= 11
MC/DC0%0/2
0 <= $num and $num <= 11
0 <= $num
$num <= 11
Truth table0%0/3
A and B
A= 0 <= $numB= $num <= 11
| |||||||||||||||||||||||||||||
| 45 | 0 | $mon[$num]; | |||||||||||||||||||||||||||
| 46 | } | ||||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||
| 48 | 1 | 1; | |||||||||||||||||||||||||||
| 49 | __END__ | ||||||||||||||||||||||||||||