initialize global var $controlled_comma_style
authorSteve Hancock <perltidy@users.sourceforge.net>
Sun, 5 Feb 2023 16:18:28 +0000 (08:18 -0800)
committerSteve Hancock <perltidy@users.sourceforge.net>
Sun, 5 Feb 2023 16:18:28 +0000 (08:18 -0800)
lib/Perl/Tidy/Formatter.pm

index 37d61b2859c447e67fdfc1bf2b257a07b434e893..501ddbc6a492ee44e99cdef74acf12855512a260 100644 (file)
@@ -328,9 +328,11 @@ my (
     %line_up_parentheses_control_hash,
     $line_up_parentheses_control_is_lxpl,
 
-    %trailing_comma_rules,
     $controlled_comma_style,
 
+    # initialized in sub 'initialize_trailing_comma_rules'
+    %trailing_comma_rules,
+
     # regex patterns for text identification.
     # Most are initialized in a sub make_**_pattern during configuration.
     # Most can be configured by user parameters.
@@ -1317,6 +1319,8 @@ sub check_options {
     # and to configure the control hashes to them.
     $rOpts = shift;
 
+    $controlled_comma_style = 0;
+
     initialize_whitespace_hashes();
     initialize_bond_strength_hashes();