line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Log::Saftpresse::Constants; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
665
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
23
|
|
4
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
156
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
# ABSTRACT: class to hold the constants used in pflogsumm |
7
|
|
|
|
|
|
|
our $VERSION = '1.4'; # 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
|
|
4
|
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
|
|
|
|
|
1
|
$divByOneMegAt = 536870912; # 512m |
22
|
1
|
|
|
|
|
1
|
$oneK = 1024; # 1k |
23
|
1
|
|
|
|
|
3
|
$oneMeg = 1048576; # 1m |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
# Constants used throughout pflogsumm |
26
|
1
|
|
|
|
|
2
|
@monthNames = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec); |
27
|
1
|
|
|
|
|
7
|
%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
|
|
|
|
|
101
|
($thisMon, $thisYr) = (localtime(time()))[4,5]; |
31
|
1
|
|
|
|
|
3
|
$thisYr += 1900; |
32
|
|
|
|
|
|
|
|
33
|
1
|
|
|
|
|
8
|
@ISA = qw(Exporter); |
34
|
1
|
|
|
|
|
23
|
@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.4 |
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 |