File Coverage

blib/lib/Log/Saftpresse/Constants.pm
Criterion Covered Total %
statement 17 17 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 20 20 100.0


line stmt bran cond sub pod time code
1             package Log::Saftpresse::Constants;
2              
3 1     1   1258 use strict;
  1         2  
  1         32  
4 1     1   5 use warnings;
  1         2  
  1         295  
5              
6             # ABSTRACT: class to hold the constants used in pflogsumm
7             our $VERSION = '1.6'; # VERSION
8              
9             our (@ISA, @EXPORT);
10              
11             our ($divByOneKAt, $divByOneMegAt, $oneK, $oneMeg);
12             our (@monthNames, %monthNums, $thisMon, $thisYr);
13              
14             BEGIN {
15 1     1   11 require Exporter;
16              
17             # Some constants used by display routines. I arbitrarily chose to
18             # display in kilobytes and megabytes at the 512k and 512m boundaries,
19             # respectively. Season to taste.
20 1         1 $divByOneKAt = 524288; # 512k
21 1         3 $divByOneMegAt = 536870912; # 512m
22 1         1 $oneK = 1024; # 1k
23 1         2 $oneMeg = 1048576; # 1m
24              
25             # Constants used throughout pflogsumm
26 1         3 @monthNames = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec);
27 1         10 %monthNums = qw(
28             Jan 0 Feb 1 Mar 2 Apr 3 May 4 Jun 5
29             Jul 6 Aug 7 Sep 8 Oct 9 Nov 10 Dec 11);
30 1         32 ($thisMon, $thisYr) = (localtime(time()))[4,5];
31 1         3 $thisYr += 1900;
32              
33 1         12 @ISA = qw(Exporter);
34 1         29 @EXPORT = qw(
35             $divByOneKAt $divByOneMegAt $oneK $oneMeg
36             @monthNames %monthNums $thisMon $thisYr
37             );
38             }
39              
40              
41             1;
42              
43             __END__
44              
45             =pod
46              
47             =encoding UTF-8
48              
49             =head1 NAME
50              
51             Log::Saftpresse::Constants - class to hold the constants used in pflogsumm
52              
53             =head1 VERSION
54              
55             version 1.6
56              
57             =head1 AUTHOR
58              
59             Markus Benning <ich@markusbenning.de>
60              
61             =head1 COPYRIGHT AND LICENSE
62              
63             This software is Copyright (c) 1998 by James S. Seymour, 2015 by Markus Benning.
64              
65             This is free software, licensed under:
66              
67             The GNU General Public License, Version 2, June 1991
68              
69             =cut