my @q = qw(k w i Z ->);
@is_kwiZ{@q} = (1) x scalar(@q);
- @q = qw<( [ { L R } ] ) b>;
+ # added = for b1211
+ @q = qw<( [ { L R } ] ) = b>;
push @q, ',';
@is_key_type{@q} = (1) x scalar(@q);
}
# previous loop: for ( my $j = $im1 ; $j >= 0 ; $j-- ) {
for ( my $j = $iprev_nb ; $j >= 0 ; $j-- ) {
##last if ( $types_to_go[$j] =~ /^[\(\[\{L\}\]\)Rb,]$/ );
- last if ( $is_key_type{ $types_to_go[$j] } );
+ if ( $is_key_type{ $types_to_go[$j] } ) {
+
+ # fix for b1211
+ if ( $types_to_go[$j] eq '=' ) { $i_opening_minus = $j }
+ last;
+ }
$i_opening_minus = $j;
}
if ( $types_to_go[$i_opening_minus] eq 'b' ) { $i_opening_minus++ }
if ( $gnu_sequence_number != $seqno
|| $i > $max_gnu_item_index )
{
+ # non-fatal, keep going except in DEVEL_MODE
if (DEVEL_MODE) {
Fault(<<EOM);
Program bug with -lp. seqno=$seqno should be $gnu_sequence_number and i=$i should be less than max=$max_gnu_item_index
EOM
}
- warning(
-"Program bug with -lp. seqno=$seqno should be $gnu_sequence_number and i=$i should be less than max=$max_gnu_item_index\n"
- );
- report_definite_bug();
}
else {
if ( $arrow_count == 0 ) {
# only negative levels can get here, and $level was forced
# to be positive above.
else {
+
+ # non-fatal, keep going except in DEVEL_MODE
if (DEVEL_MODE) {
Fault(<<EOM);
program bug with -lp: stack_error. level=$level; lev=$lev; ci_level=$ci_level; ci_lev=$ci_lev; rerun with -nlp
EOM
}
-
- warning(
-"program bug with -lp: stack_error. level=$level; lev=$lev; ci_level=$ci_level; ci_lev=$ci_lev; rerun with -nlp\n"
- );
- report_definite_bug();
last;
}
}
# shouldn't happen except for code bug:
else {
- my $level = $gnu_item_list[$i_debug]->get_level();
- my $ci_level = $gnu_item_list[$i_debug]->get_ci_level();
- my $old_level = $gnu_item_list[$i]->get_level();
- my $old_ci_level = $gnu_item_list[$i]->get_ci_level();
+ # non-fatal, keep going except in DEVEL_MODE
if (DEVEL_MODE) {
+ my $level = $gnu_item_list[$i_debug]->get_level();
+ my $ci_level = $gnu_item_list[$i_debug]->get_ci_level();
+ my $old_level = $gnu_item_list[$i]->get_level();
+ my $old_ci_level = $gnu_item_list[$i]->get_ci_level();
Fault(<<EOM);
program bug with -lp: want to delete $deleted_spaces from item $i, but old=$old_spaces deleted: lev=$level ci=$ci_level deleted: level=$old_level ci=$ci_level
EOM
}
-
- warning(
-"program bug with -lp: want to delete $deleted_spaces from item $i, but old=$old_spaces deleted: lev=$level ci=$ci_level deleted: level=$old_level ci=$ci_level\n"
- );
- report_definite_bug();
}
}
$gnu_position_predictor -= $deleted_spaces;
- review tickets at [rt.cpan.org](https://rt.cpan.org/Public/Dist/Display.html?Name=Perl-Tidy)
- review the issues at [github](https://github.com/perltidy/perltidy/issues/)
- compare formatting with the new version with previous version on all files in test area
-- run a blinker test (activate option -I and look for 'Blinker' in DIAGNOSTICS)
-- run a timing test: compare run time with previous version
- profile with Devel::NYTProf with different parameters and compare with previous version: For example
perl -d:NYTProf perltidy.pl -pbp -nst -nse -wn -xci perltidy.pl
nytprofhtml --open
-- run random testing on final version for a significant time before releasing (several days)
-- rerun all resolved blinker test cases to verify that all still run correctly
+- compare run time with previous version
+- release candidate should show no irregularities in at least 24 cpu hours of random testing
+- run 'devbin/run__convergence_tests.pl' to insure convergence
- run 'author tests' on a much larger body of code than is covered by the .t
files.
- compare results of the current version with previous version