From 49ee66fb8ccab5ab9318938589904ab7d352a348 Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Sat, 26 Sep 2020 07:35:09 -0700 Subject: [PATCH] improve user interface --- t/snippets/perltidy_random_setup.pl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/t/snippets/perltidy_random_setup.pl b/t/snippets/perltidy_random_setup.pl index 78a04a26..274e81e7 100755 --- a/t/snippets/perltidy_random_setup.pl +++ b/t/snippets/perltidy_random_setup.pl @@ -26,13 +26,13 @@ EOM default_config(); if ( -e $config_file ) { - if ( ifyes("Read the existing config.txt file? [Y/N]") ) { + if ( ifyes("Read the existing config.txt file? [Y/N]", "Y") ) { read_config($config_file); } } if ( -e $FILES_file ) { - if (ifyes("Found $FILES_file, read it ? [Y/N]") ) { + if (ifyes("Found $FILES_file, read it ? [Y/N]", "Y") ) { $rfiles = read_list($FILES_file); my $nfiles=@{$rfiles}; print STDOUT "found $nfiles files\n"; @@ -45,7 +45,7 @@ if ( !@{$rfiles} ) { } if ( -e $PROFILES_file ) { - if (ifyes("Found $PROFILES_file, read it ? [Y/N]") ) { + if (ifyes("Found $PROFILES_file, read it ? [Y/N]", "Y") ) { $rprofiles = read_list($PROFILES_file); my $nfiles=@{$rprofiles}; print STDOUT "found $nfiles profiles\n"; @@ -57,7 +57,7 @@ if ( !@{$rprofiles} ) { $rprofiles = filter_profiles($rprofiles); } -$rsetup->{'syntax_check'} = ifyes(<{'syntax_check'} = ifyes(<{chain_mode} = $chain_mode; } elsif ( $ans eq 'D' ) { - $delete_good_output = ifyes("Delete needless good output files? [Y/N]"); + $delete_good_output = ifyes("Delete needless good output files? [Y/N]","Y"); $rsetup->{delete_good_output} = $delete_good_output; } elsif ( $ans eq 'S' ) { - $do_syntax_check = ifyes("Do syntax checking? [Y/N]"); + $do_syntax_check = ifyes("Do syntax checking? [Y/N]","N"); $rsetup->{syntax_check} = $do_syntax_check; } elsif ( $ans eq 'Q' ) { -- 2.39.5