File Coverage

blib/lib/Linux/loadavg.pm
Criterion Covered Total %
statement 21 21 100.0
branch n/a
condition n/a
subroutine 7 7 100.0
pod n/a
total 28 28 100.0


line stmt bran cond sub pod time code
1             package Linux::loadavg;
2              
3 1     1   9447 use 5.006;
  1         4  
  1         43  
4 1     1   6 use strict;
  1         2  
  1         34  
5 1     1   5 use warnings;
  1         6  
  1         41  
6 1     1   5 use Carp;
  1         2  
  1         226  
7              
8             require Exporter;
9             require DynaLoader;
10              
11             our @ISA = qw(Exporter DynaLoader);
12              
13             # Items to export into callers namespace by default. Note: do not export
14             # names by default without a very good reason. Use EXPORT_OK instead.
15             # Do not simply export all your public functions/methods/constants.
16              
17             # This allows declaration use Linux::loadavg ':all';
18             # If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
19             # will save memory.
20             our %EXPORT_TAGS = ( 'all' => [ qw(
21             loadavg
22             LOADAVG_1MIN
23             LOADAVG_5MIN
24             LOADAVG_15MIN
25             ) ] );
26              
27             our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
28              
29             our @EXPORT = qw(
30             loadavg
31             LOADAVG_1MIN
32             LOADAVG_5MIN
33             LOADAVG_15MIN
34             );
35             our $VERSION = '0.09';
36              
37 1     1   7 use constant LOADAVG_1MIN => 0;
  1         2  
  1         82  
38 1     1   5 use constant LOADAVG_5MIN => 1;
  1         2  
  1         44  
39 1     1   4 use constant LOADAVG_15MIN => 2;
  1         2  
  1         112  
40              
41             bootstrap Linux::loadavg $VERSION;
42              
43             # Preloaded methods go here.
44              
45             die "Wrong OS ('$^O' !~ m#(?i)linux#)"
46             unless $^O =~ m#(?i)linux#;
47              
48             1;
49             __END__