line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Parse::PlainConfig::Settings -- Settings Class |
2
|
|
|
|
|
|
|
# |
3
|
|
|
|
|
|
|
# (c) 2016, Arthur Corliss |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
# $Id: lib/Parse/PlainConfig/Settings.pm, 3.06 2023/09/23 19:24:20 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
|
10
|
|
|
10
|
|
186
|
use 5.008; |
|
10
|
|
|
|
|
30
|
|
21
|
|
|
|
|
|
|
|
22
|
10
|
|
|
10
|
|
52
|
use strict; |
|
10
|
|
|
|
|
16
|
|
|
10
|
|
|
|
|
214
|
|
23
|
10
|
|
|
10
|
|
44
|
use warnings; |
|
10
|
|
|
|
|
19
|
|
|
10
|
|
|
|
|
400
|
|
24
|
10
|
|
|
10
|
|
59
|
use vars qw($VERSION); |
|
10
|
|
|
|
|
22
|
|
|
10
|
|
|
|
|
825
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
($VERSION) = ( q$Revision: 3.06 $ =~ /(\d+(?:\.\d+)+)/sm ); |
27
|
|
|
|
|
|
|
|
28
|
10
|
|
|
10
|
|
75
|
use Paranoid; |
|
10
|
|
|
|
|
17
|
|
|
10
|
|
|
|
|
513
|
|
29
|
10
|
|
|
10
|
|
60
|
use Paranoid::Debug; |
|
10
|
|
|
|
|
28
|
|
|
10
|
|
|
|
|
1016
|
|
30
|
10
|
|
|
10
|
|
70
|
use Parse::PlainConfig::Constants qw(:all); |
|
10
|
|
|
|
|
18
|
|
|
10
|
|
|
|
|
1425
|
|
31
|
10
|
|
|
10
|
|
78
|
use Class::EHierarchy qw(:all); |
|
10
|
|
|
|
|
40
|
|
|
10
|
|
|
|
|
1303
|
|
32
|
10
|
|
|
10
|
|
76
|
use vars qw(@ISA @_properties @_methods); |
|
10
|
|
|
|
|
20
|
|
|
10
|
|
|
|
|
5014
|
|
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
|
|
|
|
|
|
|
[ CEH_PUB | CEH_ARRAY, '_ppcClasses' ], |
51
|
|
|
|
|
|
|
); |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
##################################################################### |
54
|
|
|
|
|
|
|
# |
55
|
|
|
|
|
|
|
# Module code follows |
56
|
|
|
|
|
|
|
# |
57
|
|
|
|
|
|
|
##################################################################### |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
sub tabStop { |
60
|
29
|
|
|
29
|
1
|
111
|
my $obj = shift; |
61
|
29
|
|
|
|
|
112
|
return $obj->get('tab stop'); |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
sub subindentation { |
65
|
138
|
|
|
138
|
1
|
231
|
my $obj = shift; |
66
|
138
|
|
|
|
|
296
|
return $obj->get('subindentation'); |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
sub comment { |
70
|
31
|
|
|
31
|
1
|
77
|
my $obj = shift; |
71
|
31
|
|
|
|
|
85
|
return $obj->get('comment'); |
72
|
|
|
|
|
|
|
} |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
sub delimiter { |
75
|
105
|
|
|
105
|
1
|
251
|
my $obj = shift; |
76
|
105
|
|
|
|
|
312
|
return $obj->get('delimiter'); |
77
|
|
|
|
|
|
|
} |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
sub listDelimiter { |
80
|
127
|
|
|
127
|
1
|
225
|
my $obj = shift; |
81
|
127
|
|
|
|
|
276
|
return $obj->get('list delimiter'); |
82
|
|
|
|
|
|
|
} |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
sub hashDelimiter { |
85
|
127
|
|
|
127
|
1
|
215
|
my $obj = shift; |
86
|
127
|
|
|
|
|
263
|
return $obj->get('hash delimiter'); |
87
|
|
|
|
|
|
|
} |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
sub hereDoc { |
90
|
72
|
|
|
72
|
1
|
155
|
my $obj = shift; |
91
|
72
|
|
|
|
|
165
|
return $obj->get('here doc'); |
92
|
|
|
|
|
|
|
} |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
sub propertyTypes { |
95
|
289
|
|
|
289
|
1
|
1095
|
my $obj = shift; |
96
|
289
|
|
|
|
|
607
|
return $obj->get('property types'); |
97
|
|
|
|
|
|
|
} |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
sub propertyRegexes { |
100
|
138
|
|
|
138
|
1
|
230
|
my $obj = shift; |
101
|
138
|
|
|
|
|
349
|
return $obj->get('property regexes'); |
102
|
|
|
|
|
|
|
} |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
sub prototypes { |
105
|
138
|
|
|
138
|
1
|
251
|
my $obj = shift; |
106
|
138
|
|
|
|
|
296
|
return $obj->get('prototypes'); |
107
|
|
|
|
|
|
|
} |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
sub prototypeRegexes { |
110
|
138
|
|
|
138
|
1
|
247
|
my $obj = shift; |
111
|
138
|
|
|
|
|
287
|
return $obj->get('prototype regexes'); |
112
|
|
|
|
|
|
|
} |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
1; |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
__END__ |