]> git.donarmstrong.com Git - perltidy.git/commitdiff
add ref check needed due to recent update for -lp
authorSteve Hancock <perltidy@users.sourceforge.net>
Fri, 12 Nov 2021 00:27:00 +0000 (16:27 -0800)
committerSteve Hancock <perltidy@users.sourceforge.net>
Fri, 12 Nov 2021 00:27:00 +0000 (16:27 -0800)
lib/Perl/Tidy/Formatter.pm

index ae64136f7660628a419b3271acd4751ced6bfaa0..28faa601a68389717a5c457a95ff06be2ef21543 100644 (file)
@@ -22641,13 +22641,14 @@ sub get_seqno {
 
                 # make sure this won't change if -lp is used
                 my $indentation_1 = $leading_spaces_to_go[$ibeg];
-                if ( ref($indentation_1) ) {
-                    if ( $indentation_1->get_recoverable_spaces() == 0 ) {
-                        my $indentation_2 = $leading_spaces_to_go[$ibeg_next];
-                        unless ( $indentation_2->get_recoverable_spaces() == 0 )
-                        {
-                            $pad_spaces = 0;
-                        }
+                if ( ref($indentation_1)
+                    && $indentation_1->get_recoverable_spaces() == 0 )
+                {
+                    my $indentation_2 = $leading_spaces_to_go[$ibeg_next];
+                    if ( ref($indentation_2)
+                        && $indentation_2->get_recoverable_spaces() != 0 )
+                    {
+                        $pad_spaces = 0;
                     }
                 }