From: Steve Hancock Date: Thu, 5 Nov 2020 16:30:17 +0000 (-0800) Subject: minor optimization X-Git-Tag: 20201001.03^0 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=6dbf0348eb1438ea3b783a097d1a7346acb002c7;p=perltidy.git minor optimization --- diff --git a/lib/Perl/Tidy/VerticalAligner.pm b/lib/Perl/Tidy/VerticalAligner.pm index 1e7e8bf8..d960c9fc 100644 --- a/lib/Perl/Tidy/VerticalAligner.pm +++ b/lib/Perl/Tidy/VerticalAligner.pm @@ -429,7 +429,7 @@ sub valign_input { $is_outdented = 0 if $is_hanging_side_comment; # Identify a block comment. - my $is_block_comment = ( $jmax == 0 && $rfields->[0] =~ /^#/ ); + my $is_block_comment = $jmax == 0 && substr( $rfields->[0], 0, 1 ) eq '#'; # Block comment .. update count if ($is_block_comment) {