File Coverage

blib/lib/Debug/Phases.pm
Criterion Covered Total %
statement 25 25 100.0
branch 1 2 50.0
condition n/a
subroutine 7 7 100.0
pod n/a
total 33 34 97.0


line stmt bran cond sub pod time code
1             package Debug::Phases;
2              
3 1     1   24017 use version; $VERSION = qv('0.0.2');
  1         2436  
  1         4  
4              
5 1     1   79 use warnings;
  1         3  
  1         33  
6 1     1   5 use strict;
  1         6  
  1         26  
7 1     1   5 use Carp;
  1         3  
  1         107  
8 1     1   930 use Time::HiRes qw(time);
  1         2316  
  1         5  
9              
10             my $start;
11              
12             BEGIN {
13 1     1   233 $start = time();
14 1         2 print {*STDERR} "Compiling..."
  1         166  
15             }
16              
17             INIT {
18 1     1   20 my $delta = sprintf '%.2f', time()-$start;
19 1         3 print {*STDERR} "$delta second";
  1         132  
20 1 50       16 print {*STDERR} 's' if $delta != 1;
  1         56  
21 1         3 print {*STDERR} "\nRunning...\n"
  1         81  
22             }
23              
24             1; # Magic true value required at end of module
25             __END__