Controller/Const.pm

filter: Statementstmt 88.8% 16 / 18 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 91.6% 22 / 24 CC 1 SCAR 0.5
CC
1
Cov
89%
BEGIN
1.3
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Controller/Render/Template.pm ↑ Summary Controller/NonResponseBase.pm »
1 package Apache2::Controller::Const;
2  
3 =head1 NAME
4  
5 Apache2::Controller::Const - constants for Apache2::Controller
6  
7 =head1 VERSION
8  
9 Version 1.001.001
10  
11 =cut
12  
13 2 ▶use version;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 our $VERSION = version->new('1.001.001');
15  
16 =head1 SYNOPSIS
17  
18 use Apache2::Controller::Const
19 '@RANDCHARS',
20 qw( $NOT_GOOD_CHARS $ACCESS_LOG_REASON_LENGTH );
21  
22 =head1 DESCRIPTION
23  
24 Various common Readonly constants for use by Apache2::Controller modules.
25  
26 =head1 CONSTANTS
27  
28 =cut
29  
30 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
31 2 ▶use warnings FATAL => 'all';
Subroutine BEGIN: called CC=1 SCAR=0.0
32 2 ▶use Readonly;
Subroutine BEGIN: called CC=1 SCAR=0.0
33  
34 2 ▶use Log::Log4perl qw( :levels );
Subroutine BEGIN: called CC=1 SCAR=0.0
35 0 ▶use Apache2::Const -compile => qw( :log );
Subroutine BEGIN: called CC=1 SCAR=2.6
36  
37 use base 'Exporter';
38  
39 our @EXPORT_OK = qw(
40 @RANDCHARS
41 $NOT_GOOD_CHARS
42 $DEFAULT_CONSUMER_SECRET
43 $DEFAULT_SESSION_SECRET
44 );
45  
46 =head2 @RANDCHARS
47  
48 An array of the alphabet plus ascii symbols
49 from which to pick random characters.
50  
51 =cut
52  
53 Readonly::Array our @RANDCHARS => (
54 'A'..'Z', 'a'..'z', 0..9, '#', '(', ')', ',',
55 qw( ! @ $ % ^ & * - _ = + [ ] { } ; : ' " \ | < . > / ? ~ ` )
56 );
57  
58  
59 =head2 $NOT_GOOD_CHARS
60  
61 A strict qr{} pattern of characters that are not good for basic user input.
62 Maybe get rid of this one...
63  
64 =cut
65  
66 Readonly our $NOT_GOOD_CHARS => qr{ [^\w\#\@\.\-:/, ] }mxs;
67  
68 =head2 $DEFAULT_CONSUMER_SECRET
69  
70 Some hardcoded garbage characters used to salt the sha hash of time
71 for the OpenID consumer secret if one isn't specified or generated.
72  
73 See L<Apache2::Controller::Auth::OpenID> and
74 L<Apache2::Controller::Directives/A2C_Auth_OpenID_Consumer_Secret>.
75  
76 =cut
77  
78 Readonly our $DEFAULT_CONSUMER_SECRET => q|-qf_AD4#~a{~3)84cCvd+$6R89+,[l|;
79  
80 =head2 $DEFAULT_SESSION_SECRET
81  
82 Some hardcoded garbage characters used to salt the sha hash of time
83 for the session key secret if one isn't specified or generated.
84  
85 See L<Apache2::Controller::Session::Cookie> and
86 L<Apache2::Controller::Directives/A2C_Session_Secret>.
87  
88 =cut
89  
90 Readonly our $DEFAULT_SESSION_SECRET => q|Je52oN~$VSE.8PNs-e$5tRzB<=l.IC|;
91  
92 =head1 SEE ALSO
93  
94 Apache2::Controller
95  
96 =cut
97  
98 1;
« Controller/Render/Template.pm ↑ Summary Controller/NonResponseBase.pm »