line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
507
|
|
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
push(@::bean_desc, { |
4
|
|
|
|
|
|
|
bean_opt => { |
5
|
|
|
|
|
|
|
abstract => 'PerlBean code style information', |
6
|
|
|
|
|
|
|
package => 'PerlBean::Style', |
7
|
|
|
|
|
|
|
use_perl_version => 5.005, |
8
|
|
|
|
|
|
|
singleton => 1, |
9
|
|
|
|
|
|
|
description => <
|
10
|
|
|
|
|
|
|
C class for code generation style |
11
|
|
|
|
|
|
|
EOF |
12
|
|
|
|
|
|
|
short_description => 'contains PerlBean code style information', |
13
|
|
|
|
|
|
|
}, |
14
|
|
|
|
|
|
|
attr_opt => [ |
15
|
|
|
|
|
|
|
{ |
16
|
|
|
|
|
|
|
method_factory_name => 'indent', |
17
|
|
|
|
|
|
|
type => 'SINGLE', |
18
|
|
|
|
|
|
|
allow_rx => [qw(.*)], |
19
|
|
|
|
|
|
|
default_value => ' ', |
20
|
|
|
|
|
|
|
short_description => 'the string used for ONE indentation', |
21
|
|
|
|
|
|
|
}, |
22
|
|
|
|
|
|
|
{ |
23
|
|
|
|
|
|
|
method_factory_name => 'str_pre_block_open_curl', |
24
|
|
|
|
|
|
|
type => 'SINGLE', |
25
|
|
|
|
|
|
|
allow_rx => [qw(.*)], |
26
|
|
|
|
|
|
|
default_value => ' ', |
27
|
|
|
|
|
|
|
short_description => 'the string printed before the opening curly of a multi-line BLOCK. Any string C<__IND_BLOCK__> in the value is replaced with the correct block indentation', |
28
|
|
|
|
|
|
|
}, |
29
|
|
|
|
|
|
|
{ |
30
|
|
|
|
|
|
|
method_factory_name => 'str_post_block_close_curl', |
31
|
|
|
|
|
|
|
type => 'SINGLE', |
32
|
|
|
|
|
|
|
allow_rx => [qw(.*)], |
33
|
|
|
|
|
|
|
default_value => "\n__IND_BLOCK__", |
34
|
|
|
|
|
|
|
short_description => 'the string printed after the closing curly of a multi-line BLOCK. Any string C<__IND_BLOCK__> in the value is replaced with the correct block indentation', |
35
|
|
|
|
|
|
|
}, |
36
|
|
|
|
|
|
|
{ |
37
|
|
|
|
|
|
|
method_factory_name => 'str_around_operators', |
38
|
|
|
|
|
|
|
type => 'SINGLE', |
39
|
|
|
|
|
|
|
allow_rx => [qw(.*)], |
40
|
|
|
|
|
|
|
default_value => ' ', |
41
|
|
|
|
|
|
|
short_description => 'the string around most operators', |
42
|
|
|
|
|
|
|
}, |
43
|
|
|
|
|
|
|
{ |
44
|
|
|
|
|
|
|
method_factory_name => 'str_around_complex_subscripts', |
45
|
|
|
|
|
|
|
type => 'SINGLE', |
46
|
|
|
|
|
|
|
allow_rx => [qw(.*)], |
47
|
|
|
|
|
|
|
default_value => ' ', |
48
|
|
|
|
|
|
|
short_description => 'the string around "complex" subscripts(inside brackets)', |
49
|
|
|
|
|
|
|
}, |
50
|
|
|
|
|
|
|
{ |
51
|
|
|
|
|
|
|
method_factory_name => 'str_between_conditional_and_parenthesis', |
52
|
|
|
|
|
|
|
type => 'SINGLE', |
53
|
|
|
|
|
|
|
allow_rx => [qw(.*)], |
54
|
|
|
|
|
|
|
default_value => ' ', |
55
|
|
|
|
|
|
|
short_description => 'the string between conditionals (C, C, C...) and parenthesis', |
56
|
|
|
|
|
|
|
}, |
57
|
|
|
|
|
|
|
{ |
58
|
|
|
|
|
|
|
method_factory_name => 'str_between_function_and_parenthesis', |
59
|
|
|
|
|
|
|
type => 'SINGLE', |
60
|
|
|
|
|
|
|
allow_rx => [qw(.*)], |
61
|
|
|
|
|
|
|
default_value => '', |
62
|
|
|
|
|
|
|
short_description => 'the string between function name and its opening parenthesis', |
63
|
|
|
|
|
|
|
}, |
64
|
|
|
|
|
|
|
{ |
65
|
|
|
|
|
|
|
method_factory_name => 'str_after_comma', |
66
|
|
|
|
|
|
|
type => 'SINGLE', |
67
|
|
|
|
|
|
|
allow_rx => [qw(.*)], |
68
|
|
|
|
|
|
|
default_value => ' ', |
69
|
|
|
|
|
|
|
short_description => 'the string after each comma', |
70
|
|
|
|
|
|
|
}, |
71
|
|
|
|
|
|
|
{ |
72
|
|
|
|
|
|
|
method_factory_name => 'method_factory_name_to_method_base_filter', |
73
|
|
|
|
|
|
|
type => 'SINGLE', |
74
|
|
|
|
|
|
|
allow_ref => [qw(CODE)], |
75
|
|
|
|
|
|
|
default_value => '\&default_method_factory_name_to_method_base_filter', |
76
|
|
|
|
|
|
|
short_description => 'the subroutine that converts an attribute name to the method base', |
77
|
|
|
|
|
|
|
}, |
78
|
|
|
|
|
|
|
{ |
79
|
|
|
|
|
|
|
method_factory_name => 'method_operation_filter', |
80
|
|
|
|
|
|
|
type => 'SINGLE', |
81
|
|
|
|
|
|
|
allow_ref => [qw(CODE)], |
82
|
|
|
|
|
|
|
default_value => '\&default_method_operation_filter', |
83
|
|
|
|
|
|
|
short_description => 'the subroutine that formats the method operation', |
84
|
|
|
|
|
|
|
}, |
85
|
|
|
|
|
|
|
], |
86
|
|
|
|
|
|
|
meth_opt => [ |
87
|
|
|
|
|
|
|
{ |
88
|
|
|
|
|
|
|
method_name => 'default_method_factory_name_to_method_base_filter', |
89
|
|
|
|
|
|
|
parameter_description => 'ATTRIBUTE', |
90
|
|
|
|
|
|
|
description => <
|
91
|
|
|
|
|
|
|
Class method. Default attribute name to method filter. C is the attribute name. This method adds a C<_> character to C and returns it. |
92
|
|
|
|
|
|
|
EOF |
93
|
|
|
|
|
|
|
body => <
|
94
|
|
|
|
|
|
|
return( '_' . shift ); |
95
|
|
|
|
|
|
|
EOF |
96
|
|
|
|
|
|
|
}, |
97
|
|
|
|
|
|
|
{ |
98
|
|
|
|
|
|
|
method_name => 'default_method_operation_filter', |
99
|
|
|
|
|
|
|
parameter_description => 'OPERATION', |
100
|
|
|
|
|
|
|
description => <
|
101
|
|
|
|
|
|
|
Class method. Default method operation filter. C is the operation name. This method plainly returns the C. |
102
|
|
|
|
|
|
|
EOF |
103
|
|
|
|
|
|
|
body => <
|
104
|
|
|
|
|
|
|
return(shift); |
105
|
|
|
|
|
|
|
EOF |
106
|
|
|
|
|
|
|
}, |
107
|
|
|
|
|
|
|
# { |
108
|
|
|
|
|
|
|
# method_name => 'instance', |
109
|
|
|
|
|
|
|
# parameter_description => '[OPT_HASH_REF]', |
110
|
|
|
|
|
|
|
# description => <
|
111
|
|
|
|
|
|
|
#Always returns the same C -singleton- object instance. The first time it is called, parameter C -if specified- is passed to the constructor. |
112
|
|
|
|
|
|
|
#EOF |
113
|
|
|
|
|
|
|
# body => <
|
114
|
|
|
|
|
|
|
## If \$SINGLETON is defined return it |
115
|
|
|
|
|
|
|
#defined(\$SINGLETON) && return(\$SINGLETON); |
116
|
|
|
|
|
|
|
# |
117
|
|
|
|
|
|
|
#\$SINGLETON = PerlBean::Style->new(); |
118
|
|
|
|
|
|
|
#\$SINGLETON->_initialize(\@_); |
119
|
|
|
|
|
|
|
#return(\$SINGLETON); |
120
|
|
|
|
|
|
|
#EOF |
121
|
|
|
|
|
|
|
# }, |
122
|
|
|
|
|
|
|
], |
123
|
|
|
|
|
|
|
sym_opt => [ |
124
|
|
|
|
|
|
|
{ |
125
|
|
|
|
|
|
|
symbol_name => '$AC', |
126
|
|
|
|
|
|
|
export_tag => [ qw( codegen ) ], |
127
|
|
|
|
|
|
|
description => <
|
128
|
|
|
|
|
|
|
The value which would be obtained through the singleton object's C method. |
129
|
|
|
|
|
|
|
EOF |
130
|
|
|
|
|
|
|
comment => <
|
131
|
|
|
|
|
|
|
# Shortcut for singleton's get_str_after_comma() |
132
|
|
|
|
|
|
|
EOF |
133
|
|
|
|
|
|
|
}, |
134
|
|
|
|
|
|
|
{ |
135
|
|
|
|
|
|
|
symbol_name => '$ACS', |
136
|
|
|
|
|
|
|
export_tag => [ qw( codegen ) ], |
137
|
|
|
|
|
|
|
description => <
|
138
|
|
|
|
|
|
|
The value which would be obtained through the singleton object's C method. |
139
|
|
|
|
|
|
|
EOF |
140
|
|
|
|
|
|
|
comment => <
|
141
|
|
|
|
|
|
|
# Shortcut for singleton's get_str_around_complex_subscripts() |
142
|
|
|
|
|
|
|
EOF |
143
|
|
|
|
|
|
|
}, |
144
|
|
|
|
|
|
|
{ |
145
|
|
|
|
|
|
|
symbol_name => '$AN2MBF', |
146
|
|
|
|
|
|
|
export_tag => [ qw( codegen ) ], |
147
|
|
|
|
|
|
|
description => <
|
148
|
|
|
|
|
|
|
The value which would be obtained through the singleton object's C method. |
149
|
|
|
|
|
|
|
EOF |
150
|
|
|
|
|
|
|
comment => <
|
151
|
|
|
|
|
|
|
# Shortcut for singleton's get_method_factory_name_to_method_base_filter() |
152
|
|
|
|
|
|
|
EOF |
153
|
|
|
|
|
|
|
}, |
154
|
|
|
|
|
|
|
{ |
155
|
|
|
|
|
|
|
symbol_name => '$AO', |
156
|
|
|
|
|
|
|
export_tag => [ qw( codegen ) ], |
157
|
|
|
|
|
|
|
description => <
|
158
|
|
|
|
|
|
|
The value which would be obtained through the singleton object's C method. |
159
|
|
|
|
|
|
|
EOF |
160
|
|
|
|
|
|
|
comment => <
|
161
|
|
|
|
|
|
|
# Shortcut for singleton's get_str_around_operators() |
162
|
|
|
|
|
|
|
EOF |
163
|
|
|
|
|
|
|
}, |
164
|
|
|
|
|
|
|
{ |
165
|
|
|
|
|
|
|
symbol_name => '$BCP', |
166
|
|
|
|
|
|
|
export_tag => [ qw( codegen ) ], |
167
|
|
|
|
|
|
|
description => <
|
168
|
|
|
|
|
|
|
The value which would be obtained through the singleton object's C method. |
169
|
|
|
|
|
|
|
EOF |
170
|
|
|
|
|
|
|
comment => <
|
171
|
|
|
|
|
|
|
# Shortcut for singleton's get_str_between_conditional_and_parenthesis() |
172
|
|
|
|
|
|
|
EOF |
173
|
|
|
|
|
|
|
}, |
174
|
|
|
|
|
|
|
{ |
175
|
|
|
|
|
|
|
symbol_name => '$BFP', |
176
|
|
|
|
|
|
|
export_tag => [ qw( codegen ) ], |
177
|
|
|
|
|
|
|
description => <
|
178
|
|
|
|
|
|
|
The value which would be obtained through the singleton object's C method. |
179
|
|
|
|
|
|
|
EOF |
180
|
|
|
|
|
|
|
comment => <
|
181
|
|
|
|
|
|
|
# Shortcut for singleton's get_str_between_function_and_parenthesis() |
182
|
|
|
|
|
|
|
EOF |
183
|
|
|
|
|
|
|
}, |
184
|
|
|
|
|
|
|
{ |
185
|
|
|
|
|
|
|
symbol_name => '$IND', |
186
|
|
|
|
|
|
|
export_tag => [ qw( codegen ) ], |
187
|
|
|
|
|
|
|
description => <
|
188
|
|
|
|
|
|
|
The value which would be obtained through the singleton object's C method. |
189
|
|
|
|
|
|
|
EOF |
190
|
|
|
|
|
|
|
comment => <
|
191
|
|
|
|
|
|
|
# Shortcut for singleton's get_indent() |
192
|
|
|
|
|
|
|
EOF |
193
|
|
|
|
|
|
|
}, |
194
|
|
|
|
|
|
|
{ |
195
|
|
|
|
|
|
|
symbol_name => '$MOF', |
196
|
|
|
|
|
|
|
export_tag => [ qw( codegen ) ], |
197
|
|
|
|
|
|
|
description => <
|
198
|
|
|
|
|
|
|
The value which would be obtained through the singleton object's C method. |
199
|
|
|
|
|
|
|
EOF |
200
|
|
|
|
|
|
|
comment => <
|
201
|
|
|
|
|
|
|
# Shortcut for singleton's get_method_operation_filter() |
202
|
|
|
|
|
|
|
EOF |
203
|
|
|
|
|
|
|
}, |
204
|
|
|
|
|
|
|
{ |
205
|
|
|
|
|
|
|
symbol_name => '@PBCC', |
206
|
|
|
|
|
|
|
export_tag => [ qw( codegen ) ], |
207
|
|
|
|
|
|
|
description => <
|
208
|
|
|
|
|
|
|
The values which would be obtained through the singleton object's C method and the replacement of C<__IND_BLOCK__> with the correct indentation. The ARRAY's index is the level of indentation. C<10>(!) levels of indentation are available. |
209
|
|
|
|
|
|
|
EOF |
210
|
|
|
|
|
|
|
comment => <
|
211
|
|
|
|
|
|
|
# Shortcut for singleton's get_str_post_block_close_curl() |
212
|
|
|
|
|
|
|
EOF |
213
|
|
|
|
|
|
|
}, |
214
|
|
|
|
|
|
|
{ |
215
|
|
|
|
|
|
|
symbol_name => '@PBOC', |
216
|
|
|
|
|
|
|
export_tag => [ qw( codegen ) ], |
217
|
|
|
|
|
|
|
description => <
|
218
|
|
|
|
|
|
|
The values which would be obtained through the singleton object's C method and the replacement of C<__IND_BLOCK__> with the correct indentation. The ARRAY's index is the level of indentation. C<10>(!) levels of indentation are available. |
219
|
|
|
|
|
|
|
EOF |
220
|
|
|
|
|
|
|
comment => <
|
221
|
|
|
|
|
|
|
# Shortcut for singleton's get_str_pre_block_open_curl() |
222
|
|
|
|
|
|
|
EOF |
223
|
|
|
|
|
|
|
}, |
224
|
|
|
|
|
|
|
], |
225
|
|
|
|
|
|
|
tag_opt => [ |
226
|
|
|
|
|
|
|
{ |
227
|
|
|
|
|
|
|
export_tag_name => 'codegen', |
228
|
|
|
|
|
|
|
description => <
|
229
|
|
|
|
|
|
|
This tag contains variables useful for the actual code generation. You should not need to use this tag. |
230
|
|
|
|
|
|
|
EOF |
231
|
|
|
|
|
|
|
}, |
232
|
|
|
|
|
|
|
], |
233
|
|
|
|
|
|
|
} ); |
234
|
|
|
|
|
|
|
|
235
|
|
|
|
|
|
|
1; |