line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package PerlBean::Style; |
2
|
|
|
|
|
|
|
|
3
|
12
|
|
|
12
|
|
245
|
use 5.005; |
|
12
|
|
|
|
|
33
|
|
|
12
|
|
|
|
|
523
|
|
4
|
12
|
|
|
12
|
|
57
|
use base qw( Exporter ); |
|
12
|
|
|
|
|
19
|
|
|
12
|
|
|
|
|
797
|
|
5
|
12
|
|
|
12
|
|
94
|
use strict; |
|
12
|
|
|
|
|
18
|
|
|
12
|
|
|
|
|
1920
|
|
6
|
12
|
|
|
12
|
|
54
|
use warnings; |
|
12
|
|
|
|
|
15
|
|
|
12
|
|
|
|
|
1160
|
|
7
|
12
|
|
|
12
|
|
54
|
use AutoLoader qw(AUTOLOAD); |
|
12
|
|
|
|
|
14
|
|
|
12
|
|
|
|
|
54
|
|
8
|
12
|
|
|
12
|
|
474
|
use Error qw(:try); |
|
12
|
|
|
|
|
19
|
|
|
12
|
|
|
|
|
61
|
|
9
|
|
|
|
|
|
|
require Exporter; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
# Shortcut for singleton's get_str_after_comma() |
12
|
|
|
|
|
|
|
our $AC; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
# Shortcut for singleton's get_str_around_complex_subscripts() |
15
|
|
|
|
|
|
|
our $ACS; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# Shortcut for singleton's get_method_factory_name_to_method_base_filter() |
18
|
|
|
|
|
|
|
our $AN2MBF; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
# Shortcut for singleton's get_str_around_operators() |
21
|
|
|
|
|
|
|
our $AO; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
# Shortcut for singleton's get_str_between_conditional_and_parenthesis() |
24
|
|
|
|
|
|
|
our $BCP; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
# Shortcut for singleton's get_str_between_function_and_parenthesis() |
27
|
|
|
|
|
|
|
our $BFP; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
# Shortcut for singleton's get_indent() |
30
|
|
|
|
|
|
|
our $IND; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
# Shortcut for singleton's get_method_operation_filter() |
33
|
|
|
|
|
|
|
our $MOF; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
# Singleton variable |
36
|
|
|
|
|
|
|
our $SINGLETON = undef; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
# Used by _value_is_allowed |
39
|
|
|
|
|
|
|
our %ALLOW_ISA = ( |
40
|
|
|
|
|
|
|
); |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
# Used by _value_is_allowed |
43
|
|
|
|
|
|
|
our %ALLOW_REF = ( |
44
|
|
|
|
|
|
|
'method_factory_name_to_method_base_filter' => { |
45
|
|
|
|
|
|
|
'CODE' => 1, |
46
|
|
|
|
|
|
|
}, |
47
|
|
|
|
|
|
|
'method_operation_filter' => { |
48
|
|
|
|
|
|
|
'CODE' => 1, |
49
|
|
|
|
|
|
|
}, |
50
|
|
|
|
|
|
|
); |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
# Used by _value_is_allowed |
53
|
|
|
|
|
|
|
our %ALLOW_RX = ( |
54
|
|
|
|
|
|
|
'indent' => [ '.*' ], |
55
|
|
|
|
|
|
|
'str_after_comma' => [ '.*' ], |
56
|
|
|
|
|
|
|
'str_around_complex_subscripts' => [ '.*' ], |
57
|
|
|
|
|
|
|
'str_around_operators' => [ '.*' ], |
58
|
|
|
|
|
|
|
'str_between_conditional_and_parenthesis' => [ '.*' ], |
59
|
|
|
|
|
|
|
'str_between_function_and_parenthesis' => [ '.*' ], |
60
|
|
|
|
|
|
|
'str_post_block_close_curl' => [ '.*' ], |
61
|
|
|
|
|
|
|
'str_pre_block_open_curl' => [ '.*' ], |
62
|
|
|
|
|
|
|
); |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
# Used by _value_is_allowed |
65
|
|
|
|
|
|
|
our %ALLOW_VALUE = ( |
66
|
|
|
|
|
|
|
); |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
# Used by _initialize |
69
|
|
|
|
|
|
|
our %DEFAULT_VALUE = ( |
70
|
|
|
|
|
|
|
'indent' => ' ', |
71
|
|
|
|
|
|
|
'method_factory_name_to_method_base_filter' => \&default_method_factory_name_to_method_base_filter, |
72
|
|
|
|
|
|
|
'method_operation_filter' => \&default_method_operation_filter, |
73
|
|
|
|
|
|
|
'str_after_comma' => ' ', |
74
|
|
|
|
|
|
|
'str_around_complex_subscripts' => ' ', |
75
|
|
|
|
|
|
|
'str_around_operators' => ' ', |
76
|
|
|
|
|
|
|
'str_between_conditional_and_parenthesis' => ' ', |
77
|
|
|
|
|
|
|
'str_between_function_and_parenthesis' => '', |
78
|
|
|
|
|
|
|
'str_post_block_close_curl' => "\n__IND_BLOCK__", |
79
|
|
|
|
|
|
|
'str_pre_block_open_curl' => ' ', |
80
|
|
|
|
|
|
|
); |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
# Exporter variable |
83
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( |
84
|
|
|
|
|
|
|
'codegen' => [ qw( |
85
|
|
|
|
|
|
|
$AC |
86
|
|
|
|
|
|
|
$ACS |
87
|
|
|
|
|
|
|
$AN2MBF |
88
|
|
|
|
|
|
|
$AO |
89
|
|
|
|
|
|
|
$BCP |
90
|
|
|
|
|
|
|
$BFP |
91
|
|
|
|
|
|
|
$IND |
92
|
|
|
|
|
|
|
$MOF |
93
|
|
|
|
|
|
|
@PBCC |
94
|
|
|
|
|
|
|
@PBOC |
95
|
|
|
|
|
|
|
) ], |
96
|
|
|
|
|
|
|
); |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
# Package version |
99
|
|
|
|
|
|
|
our ($VERSION) = '$Revision: 1.0 $' =~ /\$Revision:\s+([^\s]+)/; |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
# Exporter variable |
102
|
|
|
|
|
|
|
our @EXPORT = qw( |
103
|
|
|
|
|
|
|
); |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
# Exporter variable |
106
|
|
|
|
|
|
|
our @EXPORT_OK = qw( |
107
|
|
|
|
|
|
|
$AC |
108
|
|
|
|
|
|
|
$ACS |
109
|
|
|
|
|
|
|
$AN2MBF |
110
|
|
|
|
|
|
|
$AO |
111
|
|
|
|
|
|
|
$BCP |
112
|
|
|
|
|
|
|
$BFP |
113
|
|
|
|
|
|
|
$IND |
114
|
|
|
|
|
|
|
$MOF |
115
|
|
|
|
|
|
|
@PBCC |
116
|
|
|
|
|
|
|
@PBOC |
117
|
|
|
|
|
|
|
); |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
# Shortcut for singleton's get_str_post_block_close_curl() |
120
|
|
|
|
|
|
|
our @PBCC; |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
# Shortcut for singleton's get_str_pre_block_open_curl() |
123
|
|
|
|
|
|
|
our @PBOC; |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
# Instanciate the singleton so the exported symbols are initialized |
126
|
|
|
|
|
|
|
&instance(); |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
1; |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
__END__ |