simple_test.pl untested

filter: Statementstmt 0.0% 0 / 29 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 6 Podpod n/a totaltotal 0.0% 0 / 39 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 #!/usr/bin/perl
2  
3 # ABSTRACT: for debugging single time expressions
4  
5 use Modern::Perl;
6 use lib 'lib';
7 use App::JobLog::TimeGrammar;
8 use File::Temp;
9 use DateTime;
10 use App::JobLog::Config qw(
11 start_pay_period
12 pay_period_length
13 DIRECTORY
14 );
15  
16 my $dir = File::Temp->newdir();
17 $ENV{ DIRECTORY() } = $dir;
18 my $start_pay_period = DateTime->new( year => 2011, month => 2, day => 13 );
19 start_pay_period($start_pay_period);
20 pay_period_length(14);
21  
22 my $line = join( ' ', @ARGV );
23  
24 eval {
25 if ( my ( $h1, $h2 ) = parse($line) )
26 {
27 print "$line: $h1 - $h2\n";
28 }
29 };
30 print $@ if $@;