line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Parse::PlainConfig::Settings -- Settings Class |
2
|
|
|
|
|
|
|
# |
3
|
|
|
|
|
|
|
# (c) 2015, Arthur Corliss |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
# $Id: lib/Parse/PlainConfig/Settings.pm, 3.04 2017/02/06 02:58:13 acorliss Exp $ |
6
|
|
|
|
|
|
|
# |
7
|
|
|
|
|
|
|
# This software is licensed under the same terms as Perl, itself. |
8
|
|
|
|
|
|
|
# Please see http://dev.perl.org/licenses/ for more information. |
9
|
|
|
|
|
|
|
# |
10
|
|
|
|
|
|
|
##################################################################### |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
##################################################################### |
13
|
|
|
|
|
|
|
# |
14
|
|
|
|
|
|
|
# Environment definitions |
15
|
|
|
|
|
|
|
# |
16
|
|
|
|
|
|
|
##################################################################### |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
package Parse::PlainConfig::Settings; |
19
|
|
|
|
|
|
|
|
20
|
8
|
|
|
8
|
|
99
|
use 5.008; |
|
8
|
|
|
|
|
15
|
|
21
|
|
|
|
|
|
|
|
22
|
8
|
|
|
8
|
|
26
|
use strict; |
|
8
|
|
|
|
|
6
|
|
|
8
|
|
|
|
|
121
|
|
23
|
8
|
|
|
8
|
|
24
|
use warnings; |
|
8
|
|
|
|
|
7
|
|
|
8
|
|
|
|
|
170
|
|
24
|
8
|
|
|
8
|
|
20
|
use vars qw($VERSION); |
|
8
|
|
|
|
|
6
|
|
|
8
|
|
|
|
|
445
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
($VERSION) = ( q$Revision: 3.04 $ =~ /(\d+(?:\.\d+)+)/sm ); |
27
|
|
|
|
|
|
|
|
28
|
8
|
|
|
8
|
|
27
|
use Paranoid; |
|
8
|
|
|
|
|
6
|
|
|
8
|
|
|
|
|
314
|
|
29
|
8
|
|
|
8
|
|
27
|
use Paranoid::Debug; |
|
8
|
|
|
|
|
10
|
|
|
8
|
|
|
|
|
356
|
|
30
|
8
|
|
|
8
|
|
26
|
use Parse::PlainConfig::Constants qw(:all); |
|
8
|
|
|
|
|
7
|
|
|
8
|
|
|
|
|
883
|
|
31
|
8
|
|
|
8
|
|
27
|
use Class::EHierarchy qw(:all); |
|
8
|
|
|
|
|
7
|
|
|
8
|
|
|
|
|
754
|
|
32
|
8
|
|
|
8
|
|
29
|
use vars qw(@ISA @_properties @_methods); |
|
8
|
|
|
|
|
7
|
|
|
8
|
|
|
|
|
2587
|
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
@ISA = qw(Class::EHierarchy); |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
@_properties = ( |
37
|
|
|
|
|
|
|
[ CEH_PUB | CEH_SCALAR, 'tab stop', DEFAULT_TAB ], |
38
|
|
|
|
|
|
|
[ CEH_PUB | CEH_SCALAR, 'subindentation', DEFAULT_SUBI ], |
39
|
|
|
|
|
|
|
[ CEH_PUB | CEH_SCALAR, 'comment', DEFAULT_CMMT ], |
40
|
|
|
|
|
|
|
[ CEH_PUB | CEH_SCALAR, 'delimiter', DEFAULT_PDLM ], |
41
|
|
|
|
|
|
|
[ CEH_PUB | CEH_SCALAR, 'list delimiter', DEFAULT_LDLM ], |
42
|
|
|
|
|
|
|
[ CEH_PUB | CEH_SCALAR, 'hash delimiter', DEFAULT_HDLM ], |
43
|
|
|
|
|
|
|
[ CEH_PUB | CEH_SCALAR, 'here doc', DEFAULT_HDOC ], |
44
|
|
|
|
|
|
|
[ CEH_PUB | CEH_HASH, 'property types' ], |
45
|
|
|
|
|
|
|
[ CEH_PUB | CEH_HASH, 'property regexes' ], |
46
|
|
|
|
|
|
|
[ CEH_PUB | CEH_HASH, 'prototypes' ], |
47
|
|
|
|
|
|
|
[ CEH_PUB | CEH_HASH, 'prototype regexes' ], |
48
|
|
|
|
|
|
|
[ CEH_PUB | CEH_HASH, 'prototype registry' ], |
49
|
|
|
|
|
|
|
[ CEH_PUB | CEH_SCALAR, 'error' ], |
50
|
|
|
|
|
|
|
); |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
##################################################################### |
53
|
|
|
|
|
|
|
# |
54
|
|
|
|
|
|
|
# Module code follows |
55
|
|
|
|
|
|
|
# |
56
|
|
|
|
|
|
|
##################################################################### |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
sub tabStop { |
59
|
23
|
|
|
23
|
1
|
29
|
my $obj = shift; |
60
|
23
|
|
|
|
|
51
|
return $obj->get('tab stop'); |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
sub subindentation { |
64
|
102
|
|
|
102
|
1
|
96
|
my $obj = shift; |
65
|
102
|
|
|
|
|
143
|
return $obj->get('subindentation'); |
66
|
|
|
|
|
|
|
} |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
sub comment { |
69
|
25
|
|
|
25
|
1
|
33
|
my $obj = shift; |
70
|
25
|
|
|
|
|
48
|
return $obj->get('comment'); |
71
|
|
|
|
|
|
|
} |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
sub delimiter { |
74
|
81
|
|
|
81
|
1
|
75
|
my $obj = shift; |
75
|
81
|
|
|
|
|
201
|
return $obj->get('delimiter'); |
76
|
|
|
|
|
|
|
} |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
sub listDelimiter { |
79
|
94
|
|
|
94
|
1
|
96
|
my $obj = shift; |
80
|
94
|
|
|
|
|
141
|
return $obj->get('list delimiter'); |
81
|
|
|
|
|
|
|
} |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
sub hashDelimiter { |
84
|
94
|
|
|
94
|
1
|
88
|
my $obj = shift; |
85
|
94
|
|
|
|
|
145
|
return $obj->get('hash delimiter'); |
86
|
|
|
|
|
|
|
} |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
sub hereDoc { |
89
|
60
|
|
|
60
|
1
|
48
|
my $obj = shift; |
90
|
60
|
|
|
|
|
99
|
return $obj->get('here doc'); |
91
|
|
|
|
|
|
|
} |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
sub propertyTypes { |
94
|
216
|
|
|
216
|
1
|
494
|
my $obj = shift; |
95
|
216
|
|
|
|
|
318
|
return $obj->get('property types'); |
96
|
|
|
|
|
|
|
} |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
sub propertyRegexes { |
99
|
102
|
|
|
102
|
1
|
93
|
my $obj = shift; |
100
|
102
|
|
|
|
|
177
|
return $obj->get('property regexes'); |
101
|
|
|
|
|
|
|
} |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
sub prototypes { |
104
|
102
|
|
|
102
|
1
|
99
|
my $obj = shift; |
105
|
102
|
|
|
|
|
153
|
return $obj->get('prototypes'); |
106
|
|
|
|
|
|
|
} |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
sub prototypeRegexes { |
109
|
102
|
|
|
102
|
1
|
106
|
my $obj = shift; |
110
|
102
|
|
|
|
|
147
|
return $obj->get('prototype regexes'); |
111
|
|
|
|
|
|
|
} |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
1; |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
__END__ |