]> git.donarmstrong.com Git - perltidy.git/commitdiff
minor optimization 20201001.03
authorSteve Hancock <perltidy@users.sourceforge.net>
Thu, 5 Nov 2020 16:30:17 +0000 (08:30 -0800)
committerSteve Hancock <perltidy@users.sourceforge.net>
Thu, 5 Nov 2020 16:30:17 +0000 (08:30 -0800)
lib/Perl/Tidy/VerticalAligner.pm

index 1e7e8bf8fc9d40f8e3de905b9cbf83a1e6e352be..d960c9fcba5c16e625854700882b4049781c818d 100644 (file)
@@ -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) {