Scan/Constant.pm

filter: Statementstmt 100% 74 / 74 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 22 / 22 Podpod n/a totaltotal 100% 96 / 96 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Scan/Cache.pm ↑ Summary
1 =head1 NAME
2  
3 File::OSS::Scan::Constant - define constants
4  
5 =head1 VERSION
6  
7 version 0.04
8  
9 =head1 SYNOPSIS
10  
11 use File::OSS::Scan::Constant qw(:all);
12  
13 =head1 DESCRIPTION
14  
15 This is an internal module used by L<File::OSS::Scan> to get defined constants
16 imported, and should not be called directly.
17  
18 =head1 SEE ALSO
19  
20 =over 4
21  
22 =item * L<File::OSS::Scan>
23  
24 =back
25  
26 =head1 AUTHOR
27  
28 Harry Wang <harry.wang@outlook.com>
29  
30 =head1 COPYRIGHT AND LICENSE
31  
32 This software is Copyright (c) 2014 by Harry Wang.
33  
34 This is free software, licensed under:
35  
36 Artistic License 1.0
37  
38 =cut
39  
40 package File::OSS::Scan::Constant;
41  
42 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
43 1 ▶use warnings FATAL => 'all';
Subroutine BEGIN: called CC=1 SCAR=0.0
44  
45 1 our $VERSION = '0.04';
46  
47 1 ▶use base qw(Exporter);
Subroutine BEGIN: called CC=1 SCAR=0.0
48  
49 1 my @all_constants = do {
50 1 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
51 1 grep { exists &$_ } keys %{ __PACKAGE__ . '::' };
52 };
53  
54 1 our @EXPORT_OK = ( @all_constants );
55 1 our %EXPORT_TAGS = ( all => \@EXPORT_OK );
56  
57  
58 # -------------------------
59 # Universal constants
60 # -------------------------
61 1 ▶use constant UNI_TRUE => 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
62 1 ▶use constant UNI_FALSE => 0;
Subroutine BEGIN: called CC=1 SCAR=0.0
63  
64 # -------------------------
65 # Verbose level
66 # -------------------------
67 1 ▶use constant VERBOSE_SILIENT => 0;
Subroutine BEGIN: called CC=1 SCAR=0.0
68 1 ▶use constant VERBOSE_NORMAL => 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
69 1 ▶use constant VERBOSE_CHATTY => 2;
Subroutine BEGIN: called CC=1 SCAR=0.0
70  
71 # -------------------------
72 # Cache level
73 # -------------------------
74 1 ▶use constant CACHE_NONE => 0;
Subroutine BEGIN: called CC=1 SCAR=0.0
75 1 ▶use constant CACHE_USE => 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
76 1 ▶use constant CACHE_REFRESH => 2;
Subroutine BEGIN: called CC=1 SCAR=0.0
77  
78 # -------------------------
79 # Log formatting constants
80 # -------------------------
81 1 ▶use constant WIDTH_FILENAME => 30;
Subroutine BEGIN: called CC=1 SCAR=0.0
82 1 ▶use constant WIDTH_SIZE => 10;
Subroutine BEGIN: called CC=1 SCAR=0.0
83 1 ▶use constant WIDTH_MTIME => 20;
Subroutine BEGIN: called CC=1 SCAR=0.0
84 1 ▶use constant WIDTH_BAR => 100;
Subroutine BEGIN: called CC=1 SCAR=0.0
85 1 ▶use constant WIDTH_INFO_KEY => 30;
Subroutine BEGIN: called CC=1 SCAR=0.0
86 1 ▶use constant WIDTH_INFO_VAL => 100;
Subroutine BEGIN: called CC=1 SCAR=0.0
87  
88 # -------------------------
89 # Return status
90 # -------------------------
91 1 ▶use constant SUCCESS => 0;
Subroutine BEGIN: called CC=1 SCAR=0.0
92 1 ▶use constant FAIL => 99;
Subroutine BEGIN: called CC=1 SCAR=0.0
93 1 ▶use constant SKIP => 98;
Subroutine BEGIN: called CC=1 SCAR=0.0
94  
95 # -------------------------
96 # level of certainty
97 # -------------------------
98 1 ▶use constant CERTAINTY_SURE => 100;
Subroutine BEGIN: called CC=1 SCAR=0.0
99  
100  
101  
102  
103 1 1;
« Scan/Cache.pm ↑ Summary