File Coverage

blib/lib/ProgressMonitor/State.pm
Criterion Covered Total %
statement 9 9 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 12 12 100.0


line stmt bran cond sub pod time code
1             package ProgressMonitor::State;
2            
3 10     10   53 use strict;
  10         19  
  10         325  
4 10     10   49 use warnings;
  10         23  
  10         275  
5            
6             # This defines the values used to track state for monitors - used by
7             # AbstractStatefulMonitor
8             #
9            
10 10     10   53 use Exporter qw(import);
  10         19  
  10         1796  
11             our @EXPORT = qw(STATE_NEW STATE_PREPARING STATE_ACTIVE STATE_DONE);
12            
13             # This state is when the monitor is just created
14             #
15             sub STATE_NEW () { 0 }
16            
17             # The monitor has been told that the task is preparing
18             #
19             sub STATE_PREPARING () { 1 }
20            
21             # The task has now begun its main work
22             #
23             sub STATE_ACTIVE () { 2 }
24            
25             # The task is done
26             #
27             sub STATE_DONE () { 3 }
28            
29             1;