my $test_file = $path . $name;
my ( $test_name, $test_path ) = fileparse($test_file);
return $test_file if ( $test_name eq $name );
- return if ( $^O eq 'VMS' );
+ return if ( $^O eq 'VMS' );
# this should work at least for Windows and Unix:
$test_file = $path . '/' . $name;
$add_option->( 'trim-pod', 'trp', '!' );
$add_option->( 'want-left-space', 'wls', '=s' );
$add_option->( 'want-right-space', 'wrs', '=s' );
- $add_option->( 'space-prototype-paren', 'spp', '=i' );
+ $add_option->( 'space-prototype-paren', 'spp', '=i' );
########################################
$category = 4; # Comment controls
# Check Tokenizer parameters
my $rOpts = shift;
- %is_sub = ( );
+ %is_sub = ();
$is_sub{'sub'} = 1;
# Install any aliases to 'sub'
# In something like '$${' we have type '$$' (and only
# part of an identifier)
&& !( $identifier =~ /\$$/ && $tok eq '{' )
- && ( $identifier !~ /^(sub |package )$/ )
+ && ( $identifier !~ /^(sub |package )$/ )
)
{
$type = 'i';
# is_deeply( $foo->hash_int, {}, "hash_int - correct contents" );
$is_marginal ||= ( $all_high_level && $raw_tokb eq '{' );
+ # lines with differing number of alignment tokens are marginal
+ # except for assignments
+ $is_marginal ||=
+ ( $previous_maximum_jmax_seen != $previous_minimum_jmax_seen )
+ && !$is_assignment{$raw_tokb};
+
# See if the lines end with semicolons...
my $rpatterns0 = $group_lines[0]->get_rpatterns();
my $rpatterns1 = $group_lines[1]->get_rpatterns();
}
}
- my $do_not_align =
-
- # don't align if it was just a marginal match
- $is_marginal
-
- # or lines with differing number of alignment tokens
- || ( $previous_maximum_jmax_seen != $previous_minimum_jmax_seen
- && !$leading_equals );
+ # don't align if it was just a marginal match
+ my $do_not_align = $is_marginal;
# But try to convert them into a simple comment group if the first line
# a has side comment