xmltv/lib/Ask Term.pm,1.5,1.6 Tk.pm,1.5,1.6

Nick Morrott <[email protected]> Sun, 12 Jul 2015 04:50:48 +0000
Newsgroups gmane.comp.tv.xmltv.cvs
Message-ID <[email protected]>
Update of /cvsroot/xmltv/xmltv/lib/Ask
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv961/lib/Ask

Modified Files:
	Term.pm Tk.pm 
Log Message:
4 space indents

Index: Tk.pm
===================================================================
RCS file: /cvsroot/xmltv/xmltv/lib/Ask/Tk.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Tk.pm	12 Jul 2015 00:59:01 -0000	1.5
--- Tk.pm	12 Jul 2015 04:50:46 -0000	1.6
***************
*** 8,17 ****
      eval { require Log::TraceMessages };
      if ($@) {
! 	*t = sub {};
! 	*d = sub { '' };
      }
      else {
! 	*t = \&Log::TraceMessages::t;
! 	*d = \&Log::TraceMessages::d;
      }
  }
--- 8,17 ----
      eval { require Log::TraceMessages };
      if ($@) {
!         *t = sub {};
!         *d = sub { '' };
      }
      else {
!         *t = \&Log::TraceMessages::t;
!         *d = \&Log::TraceMessages::d;
      }
  }
***************
*** 32,71 ****
  # Returns the text entered by the user.
  sub ask( $$$ ) {
!         shift;
!         my $question = shift;
!         my $show = shift;
  
!         my $textbox;
  
!         $main_window = MainWindow->new;
  
!         $main_window->title("Question");
!         $main_window->minsize(qw(400 250));
!         $main_window->geometry('+250+150');
  
!         $top_frame    = $main_window->Frame()->pack;
!         $middle_frame = $main_window->Frame()->pack;
!         $bottom_frame = $main_window->Frame()->pack(-side => 'bottom');
  
!         $top_frame->Label(-height => 2)->pack;
  
!         $top_frame->Label(-text => $question)->pack;
  
!         my $ans;
  
!         $bottom_frame->Button(-text    => "OK",
! 			  -command => sub {$ans = $textbox->get(); $main_window->destroy;},
! 			  -width    => 10
! 			 )->pack(-padx => 2, -pady => 4);
  
!         if (defined $show) {
!             $textbox = $middle_frame->Entry(-show => $show)->pack();
!         }
!         else {
!             $textbox = $middle_frame->Entry()->pack();
!         }
!         MainLoop();
  
!         return $ans;
  }
  
--- 32,71 ----
  # Returns the text entered by the user.
  sub ask( $$$ ) {
!     shift;
!     my $question = shift;
!     my $show = shift;
  
!     my $textbox;
  
!     $main_window = MainWindow->new;
  
!     $main_window->title("Question");
!     $main_window->minsize(qw(400 250));
!     $main_window->geometry('+250+150');
  
!     $top_frame    = $main_window->Frame()->pack;
!     $middle_frame = $main_window->Frame()->pack;
!     $bottom_frame = $main_window->Frame()->pack(-side => 'bottom');
  
!     $top_frame->Label(-height => 2)->pack;
  
!     $top_frame->Label(-text => $question)->pack;
  
!     my $ans;
  
!     $bottom_frame->Button(-text    => "OK",
!                           -command => sub {$ans = $textbox->get(); $main_window->destroy;},
!                           -width    => 10
!                          )->pack(-padx => 2, -pady => 4);
  
!     if (defined $show) {
!         $textbox = $middle_frame->Entry(-show => $show)->pack();
!     }
!     else {
!         $textbox = $middle_frame->Entry()->pack();
!     }
!     MainLoop();
  
!     return $ans;
  }
  
***************
*** 89,100 ****
  #
  sub ask_choice( $$$@ ) {
!         shift;
!         my $question = shift; die if not defined $question;
!         my $default = shift; die if not defined $default;
!         my @options = @_; die if not @options;
!         t "asking question $question, default $default";
!         warn "default $default not in options"
          if not grep { $_ eq $default } @options;
!         return _ask_choices( $question, $default, 0, @options );
  }
  
--- 89,100 ----
  #
  sub ask_choice( $$$@ ) {
!     shift;
!     my $question = shift; die if not defined $question;
!     my $default = shift; die if not defined $default;
!     my @options = @_; die if not @options;
!     t "asking question $question, default $default";
!     warn "default $default not in options"
          if not grep { $_ eq $default } @options;
!     return _ask_choices( $question, $default, 0, @options );
  }
  
***************
*** 109,144 ****
  #
  sub ask_boolean( $$$ ) {
!         shift;
!         my ($text, $default) = @_;
!         t "asking question $text, default $default";
  
!         $main_window = MainWindow->new;
  
!         $main_window->title('Question');
!         $main_window->minsize(qw(400 250));
!         $main_window->geometry('+250+150');
  
!         $top_frame    = $main_window->Frame()->pack;
!         $middle_frame = $main_window->Frame()->pack;
!         $bottom_frame = $main_window->Frame()->pack(-side => 'bottom');
  
!         $top_frame->Label(-height => 2)->pack;
!         $top_frame->Label(-text => $text)->pack;
  
!         my $ans = 0;
  
!         $bottom_frame->Button(-text    => "Yes",
! 			  -command => sub { $ans = 1; $main_window->destroy; },
! 			  -width => 10,
! 			 )->pack(-side => 'left', -padx => 2, -pady => 4);
  
!         $bottom_frame->Button(-text    => "No",
! 			  -command => sub { $ans = 0; $main_window->destroy; },
! 			  -width => 10
! 			 )->pack(-side => 'left', -padx => 2, -pady => 4);
  
!         MainLoop();
  
!         return $ans;
  }
  
--- 109,144 ----
  #
  sub ask_boolean( $$$ ) {
!     shift;
!     my ($text, $default) = @_;
!     t "asking question $text, default $default";
  
!     $main_window = MainWindow->new;
  
!     $main_window->title('Question');
!     $main_window->minsize(qw(400 250));
!     $main_window->geometry('+250+150');
  
!     $top_frame    = $main_window->Frame()->pack;
!     $middle_frame = $main_window->Frame()->pack;
!     $bottom_frame = $main_window->Frame()->pack(-side => 'bottom');
  
!     $top_frame->Label(-height => 2)->pack;
!     $top_frame->Label(-text => $text)->pack;
  
!     my $ans = 0;
  
!     $bottom_frame->Button(-text    => "Yes",
!                           -command => sub { $ans = 1; $main_window->destroy; },
!                           -width => 10,
!                          )->pack(-side => 'left', -padx => 2, -pady => 4);
  
!     $bottom_frame->Button(-text    => "No",
!                           -command => sub { $ans = 0; $main_window->destroy; },
!                           -width => 10
!                          )->pack(-side => 'left', -padx => 2, -pady => 4);
  
!     MainLoop();
  
!     return $ans;
  }
  
***************
*** 154,161 ****
  #
  sub ask_many_boolean( $$@ ) {
!         shift;
!         my $default=shift;
!         my @options = @_;
!         return _ask_choices('', $default, 1, @options);
  }
  
--- 154,161 ----
  #
  sub ask_many_boolean( $$@ ) {
!     shift;
!     my $default=shift;
!     my @options = @_;
!     return _ask_choices('', $default, 1, @options);
  }
  
***************
*** 163,256 ****
  # ask_choice and ask_many_boolean
  sub _ask_choices( $$$@ ) {
!         my $question=shift;
!         my $default=shift;
!         my $allowedMany=shift;
!         my @options = @_;
  
!         return if not @options;
  
!         my $select_all_button;
!         my $select_none_button;
  
!         my $listbox;
!         my $i;
  
!         $main_window = MainWindow->new;
  
!         $main_window->title('Question');
!         $main_window->minsize(qw( 400 250 ));
!         $main_window->geometry('+250+150');
  
!         $top_frame    = $main_window->Frame()->pack;
!         $middle_frame = $main_window->Frame()->pack(-fill => 'both');
  
!         $top_frame->Label(-height => 2)->pack;
  
!         $top_frame->Label(-text => $question)->pack;
  
!         $listbox = $middle_frame->ScrlListbox();
  
!         $listbox->insert(0, @options);
  
!         if ($allowedMany) {
!                 $listbox->configure( -selectmode => 'multiple' );
  
!                 if ($default) {
!                         $listbox->selectionSet( 0, 'end' );
!                 }
  
!                 $mid_bottom_frame = $main_window->Frame()->pack();
  
! 	        $select_all_button = $mid_bottom_frame->Button
!                         (-text => 'Select All',
!                         -command => sub { $listbox->selectionSet(0, 1000) },
!                         -width => 10,
!                         )->pack(-side => 'left');
  
! 	        $select_none_button = $mid_bottom_frame->Button
!                         (-text => 'Select None',
!                         -command => sub { $listbox->selectionClear(0, 1000) },
!                         -width => 10,
!                         )-> pack(-side => 'right');
!         }
!         else {
!                 $listbox->configure(-selectmode => 'single');
!                 $listbox->selectionSet(_index_array($default, @options));
!         }
  
!         $listbox->pack(-fill => 'x', -padx => '5', -pady => '2');
  
!         $bottom_frame = $main_window->Frame()->pack(-side => 'bottom');
  
!         my @cursel;
  
!         $bottom_frame->Button(-text    => 'OK',
! 			  -command => sub { @cursel = $listbox->curselection; $main_window->destroy; },
! 			  -width    => 10,
! 			 )->pack(-padx => 2, -pady => 4);
  
!         MainLoop();
  
!         if ($allowedMany) {
!                 my @choices;
!                 my @choice_numbers = @cursel;
  
!                 $i=0;
!                 foreach (@options) {
!                         push @choices, 0;
!                         foreach( @choice_numbers ) {
!                                 if ($options[$_] eq $options[$i]) {
!                                         $choices[$i] = 1;
!                                 }
!                         }
!                         $i++;
                  }
! 
!                 return @choices;
!         }
!         else {
!                 my $ans = $options[$cursel[0]];
! 	              return $ans;
          }
  }
  
--- 163,256 ----
  # ask_choice and ask_many_boolean
  sub _ask_choices( $$$@ ) {
!     my $question=shift;
!     my $default=shift;
!     my $allowedMany=shift;
!     my @options = @_;
  
!     return if not @options;
  
!     my $select_all_button;
!     my $select_none_button;
  
!     my $listbox;
!     my $i;
  
!     $main_window = MainWindow->new;
  
!     $main_window->title('Question');
!     $main_window->minsize(qw( 400 250 ));
!     $main_window->geometry('+250+150');
  
!     $top_frame    = $main_window->Frame()->pack;
!     $middle_frame = $main_window->Frame()->pack(-fill => 'both');
  
!     $top_frame->Label(-height => 2)->pack;
  
!     $top_frame->Label(-text => $question)->pack;
  
!     $listbox = $middle_frame->ScrlListbox();
  
!     $listbox->insert(0, @options);
  
!     if ($allowedMany) {
!         $listbox->configure( -selectmode => 'multiple' );
  
!         if ($default) {
!             $listbox->selectionSet( 0, 'end' );
!         }
  
!         $mid_bottom_frame = $main_window->Frame()->pack();
  
!     $select_all_button = $mid_bottom_frame->Button
!         (-text => 'Select All',
!          -command => sub { $listbox->selectionSet(0, 1000) },
!          -width => 10,
!         )->pack(-side => 'left');
  
!     $select_none_button = $mid_bottom_frame->Button
!         (-text => 'Select None',
!          -command => sub { $listbox->selectionClear(0, 1000) },
!          -width => 10,
!         )-> pack(-side => 'right');
!     }
!     else {
!         $listbox->configure(-selectmode => 'single');
!         $listbox->selectionSet(_index_array($default, @options));
!     }
  
!     $listbox->pack(-fill => 'x', -padx => '5', -pady => '2');
  
!     $bottom_frame = $main_window->Frame()->pack(-side => 'bottom');
  
!     my @cursel;
  
!     $bottom_frame->Button(-text    => 'OK',
!                           -command => sub { @cursel = $listbox->curselection; $main_window->destroy; },
!                           -width    => 10,
!                          )->pack(-padx => 2, -pady => 4);
  
!     MainLoop();
  
!     if ($allowedMany) {
!         my @choices;
!         my @choice_numbers = @cursel;
  
!         $i=0;
!         foreach (@options) {
!             push @choices, 0;
!             foreach( @choice_numbers ) {
!                 if ($options[$_] eq $options[$i]) {
!                     $choices[$i] = 1;
                  }
!             }
!             $i++;
          }
+ 
+         return @choices;
+     }
+     else {
+         my $ans = $options[$cursel[0]];
+         return $ans;
+     }
  }
  
***************
*** 260,285 ****
  #   text to show to the user
  sub say( $$ ) {
!         shift;
!         my $question = shift;
  
!         $main_window = MainWindow->new;
  
!         $main_window->title("Information");
!         $main_window->minsize(qw(400 250));
!         $main_window->geometry('+250+150');
  
!         $top_frame    = $main_window->Frame()->pack;
!         $middle_frame = $main_window->Frame()->pack;
!         $bottom_frame = $main_window->Frame()->pack(-side => 'bottom');
  
!         $top_frame->Label(-height => 2)->pack;
!         $top_frame->Label(-text => $question)->pack;
  
!         $bottom_frame->Button(-text    => "OK",
! 			  -command => sub { $main_window->destroy; },
! 			  -width    => 10,
! 			 )->pack(-padx => 2, -pady => 4);
  
!         MainLoop();
  }
  
--- 260,285 ----
  #   text to show to the user
  sub say( $$ ) {
!     shift;
!     my $question = shift;
  
!     $main_window = MainWindow->new;
  
!     $main_window->title("Information");
!     $main_window->minsize(qw(400 250));
!     $main_window->geometry('+250+150');
  
!     $top_frame    = $main_window->Frame()->pack;
!     $middle_frame = $main_window->Frame()->pack;
!     $bottom_frame = $main_window->Frame()->pack(-side => 'bottom');
  
!     $top_frame->Label(-height => 2)->pack;
!     $top_frame->Label(-text => $question)->pack;
  
!     $bottom_frame->Button(-text    => "OK",
!                           -command => sub { $main_window->destroy; },
!                           -width    => 10,
!                          )->pack(-padx => 2, -pady => 4);
  
!     MainLoop();
  }
  
***************
*** 292,303 ****
  sub _index_array($@)
  {
!         my $s=shift;
!         my @array = @_;
  
!         for (my $i = 0; $i < $#array; $i++) {
!                 return $i if $array[$i] eq $s;
!         }
  
!         return -1;
  }
  
--- 292,303 ----
  sub _index_array($@)
  {
!     my $s=shift;
!     my @array = @_;
  
!     for (my $i = 0; $i < $#array; $i++) {
!         return $i if $array[$i] eq $s;
!     }
  
!     return -1;
  }
  

Index: Term.pm
===================================================================
RCS file: /cvsroot/xmltv/xmltv/lib/Ask/Term.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Term.pm	12 Jul 2015 00:59:01 -0000	1.5
--- Term.pm	12 Jul 2015 04:50:46 -0000	1.6
***************
*** 13,22 ****
      eval { require Log::TraceMessages };
      if ($@) {
! 	*t = sub {};
! 	*d = sub { '' };
      }
      else {
! 	*t = \&Log::TraceMessages::t;
! 	*d = \&Log::TraceMessages::d;
      }
  }
--- 13,22 ----
      eval { require Log::TraceMessages };
      if ($@) {
!         *t = sub {};
!         *d = sub { '' };
      }
      else {
!         *t = \&Log::TraceMessages::t;
!         *d = \&Log::TraceMessages::d;
      }
  }
***************
*** 36,51 ****
  sub ask( $$ )
  {
!         shift;
!         my $prompt = shift;
!         chomp $prompt;
!         $prompt .= ' ' if $prompt !~ /\s$/;
!         print STDERR $prompt;
!         my $r = <STDIN>;
!         for ($r) {
!                 return undef if not defined;
!                 s/^\s+//;
!                 s/\s+$//;
!                 return $_;
!         }
  }
  
--- 36,51 ----
  sub ask( $$ )
  {
!     shift;
!     my $prompt = shift;
!     chomp $prompt;
!     $prompt .= ' ' if $prompt !~ /\s$/;
!     print STDERR $prompt;
!     my $r = <STDIN>;
!     for ($r) {
!         return undef if not defined;
!         s/^\s+//;
!         s/\s+$//;
!         return $_;
!     }
  }
  
***************
*** 57,71 ****
  sub ask_password( $$ )
  {
! 
!         shift;
!         my $prompt = shift;
!         chomp $prompt;
!         $prompt .= ' ' if $prompt !~ /\s$/;
!         print STDERR $prompt;
!         Term::ReadKey::ReadMode('noecho');
!         chomp( my $r = <STDIN> );
!         Term::ReadKey::ReadMode('restore');
!         print STDERR "\n";
!         return $r;
  }
  
--- 57,70 ----
  sub ask_password( $$ )
  {
!     shift;
!     my $prompt = shift;
!     chomp $prompt;
!     $prompt .= ' ' if $prompt !~ /\s$/;
!     print STDERR $prompt;
!     Term::ReadKey::ReadMode('noecho');
!     chomp( my $r = <STDIN> );
!     Term::ReadKey::ReadMode('restore');
!     print STDERR "\n";
!     return $r;
  }
  
***************
*** 82,150 ****
  sub ask_choice( $$$@ )
  {
!         shift;
!         my $question=shift(@_); die if not defined $question;
!         chomp $question;
!         my $default=shift(@_); die if not defined $default;
!         my @options=@_; die if not @options;
!         t "asking question $question, default $default";
!         croak "default $default not in options"
!           if not grep { $_ eq $default } @options;
  
!         my $options_size = length("@options");
!         t "size of options: $options_size";
!         my $all_digits = not ((my $tmp = join('', @options)) =~ tr/0-9//c);
!         t "all digits? $all_digits";
!         if ($options_size < 20 or $all_digits) {
!                 # Simple style, one line question.
!                 my $str = "$question [".join(',',@options)." (default=$default)] ";
!                 while ( 1 ) {
!                         my $res=ask(undef, $str);
!                         return undef if not defined $res;
!                         return $default if $res eq '';
!                         # Single character shortcut for yes/no questions
!                         return 'yes' if $res =~ /^y$/i;
!                         return 'no' if $res =~ /^n$/i;
  
!                         # Check for exact match, then for substring matching.
!                         foreach (@options) {
!                                 return $_ if $_ eq $res;
!                         }
!                         my @poss;
!                         foreach (@options) {
!                                 push @poss, $_ if /\Q$res\E/i;
!                         }
!                         if (@poss == 1) {
!                                 # Unambiguous substring match.
!                                 return $poss[0];
!                         }
  
!                         print STDERR "invalid response, please choose one of ".join(',', @options)."\n\n";
!                 }
          }
!         else {
!                 # Long list of options, present as numbered multiple choice.
!                 print STDERR "$question\n";
!                 my $optnum = 0;
!                 my (%num_to_choice, %choice_to_num);
!                 foreach (@options) {
!                         print STDERR "$optnum: $_\n";
!                         $num_to_choice{$optnum} = $_;
!                         $choice_to_num{$_} = $optnum;
!                         ++ $optnum;
!                 }
!                 $optnum--;
!                 my $r=undef;
!                 my $default_num = $choice_to_num{$default};
!                 die if not defined $default_num;
!                 until (defined $r) {
!                         $r = ask_choice(undef, 'Select one:',
! 			     $default_num, 0 .. $optnum);
!                         return undef if not defined $r;
!                         for ($num_to_choice{$r}) { return $_ if defined }
!                         print STDERR "invalid response, please choose one of "
!                                 .0 .. $optnum."\n\n";
!                         undef $r;
!                 }
          }
  }
  
--- 81,147 ----
  sub ask_choice( $$$@ )
  {
!     shift;
!     my $question=shift(@_); die if not defined $question;
!     chomp $question;
!     my $default=shift(@_); die if not defined $default;
!     my @options=@_; die if not @options;
!     t "asking question $question, default $default";
!     croak "default $default not in options"
!       if not grep { $_ eq $default } @options;
  
!     my $options_size = length("@options");
!     t "size of options: $options_size";
!     my $all_digits = not ((my $tmp = join('', @options)) =~ tr/0-9//c);
!     t "all digits? $all_digits";
!     if ($options_size < 20 or $all_digits) {
!         # Simple style, one line question.
!         my $str = "$question [".join(',',@options)." (default=$default)] ";
!         while ( 1 ) {
!             my $res=ask(undef, $str);
!             return undef if not defined $res;
!             return $default if $res eq '';
!             # Single character shortcut for yes/no questions
!             return 'yes' if $res =~ /^y$/i;
!             return 'no' if $res =~ /^n$/i;
  
!             # Check for exact match, then for substring matching.
!             foreach (@options) {
!                 return $_ if $_ eq $res;
!             }
!             my @poss;
!             foreach (@options) {
!                 push @poss, $_ if /\Q$res\E/i;
!             }
!             if (@poss == 1) {
!                 # Unambiguous substring match.
!                 return $poss[0];
!             }
  
!             print STDERR "invalid response, please choose one of ".join(',', @options)."\n\n";
          }
!     }
!     else {
!         # Long list of options, present as numbered multiple choice.
!         print STDERR "$question\n";
!         my $optnum = 0;
!         my (%num_to_choice, %choice_to_num);
!         foreach (@options) {
!             print STDERR "$optnum: $_\n";
!             $num_to_choice{$optnum} = $_;
!             $choice_to_num{$_} = $optnum;
!             ++ $optnum;
!         }
!         $optnum--;
!         my $r=undef;
!         my $default_num = $choice_to_num{$default};
!         die if not defined $default_num;
!         until (defined $r) {
!             $r = ask_choice(undef, 'Select one:', $default_num, 0 .. $optnum);
!             return undef if not defined $r;
!             for ($num_to_choice{$r}) { return $_ if defined }
!             print STDERR "invalid response, please choose one of " .0 .. $optnum."\n\n";
!             undef $r;
          }
+     }
  }
  
***************
*** 160,170 ****
  sub ask_boolean( $$$ )
  {
!         shift;
!         my ($text, $default) = @_;
!         my $r = ask_choice(undef, $text, ($default ? 'yes' : 'no'), 'yes', 'no');
!         return undef if not defined $r;
!         return 1 if $r eq 'yes';
!         return 0 if $r eq 'no';
!         die;
  }
  
--- 157,167 ----
  sub ask_boolean( $$$ )
  {
!     shift;
!     my ($text, $default) = @_;
!     my $r = ask_choice(undef, $text, ($default ? 'yes' : 'no'), 'yes', 'no');
!     return undef if not defined $r;
!     return 1 if $r eq 'yes';
!     return 0 if $r eq 'no';
!     die;
  }
  
***************
*** 181,217 ****
  sub ask_many_boolean( $$@ )
  {
!         shift;
!         my $default = shift;
  
!         # Catch a common mistake - passing the answer string as default
!         # instead of a Boolean.
!         #
!         carp "default is $default, should be 0 or 1"
!                 if $default ne '0' and $default ne '1';
  
!         my @r;
!         while (@_) {
!                 my $q = shift @_;
!                 my $r = ask_choice(undef, $q, ($default ? 'yes' : 'no'),
! 			    'yes', 'no', 'all', 'none');
!                 last if not defined $r;
!                 if ($r eq 'yes') {
!                         push @r, 1;
!                 }
!                 elsif ($r eq 'no') {
!                         push @r, 0;
!                 }
!                 elsif ($r eq 'all' or $r eq 'none') {
!                         my $bool = ($r eq 'all');
!                         push @r, $bool;
!                         foreach (@_) {
!                                 print STDERR "$_ ", ($bool ? 'yes' : 'no'), "\n";
!                                 push @r, $bool;
!                         }
!                         last;
!                 }
!                 else { die }
          }
!         return @r;
  }
  
--- 178,214 ----
  sub ask_many_boolean( $$@ )
  {
!     shift;
!     my $default = shift;
  
!     # Catch a common mistake - passing the answer string as default
!     # instead of a Boolean.
!     #
!     carp "default is $default, should be 0 or 1"
!         if $default ne '0' and $default ne '1';
  
!     my @r;
!     while (@_) {
!         my $q = shift @_;
!         my $r = ask_choice(undef, $q, ($default ? 'yes' : 'no'),
!                            'yes', 'no', 'all', 'none');
!         last if not defined $r;
!         if ($r eq 'yes') {
!             push @r, 1;
          }
!         elsif ($r eq 'no') {
!             push @r, 0;
!         }
!         elsif ($r eq 'all' or $r eq 'none') {
!             my $bool = ($r eq 'all');
!             push @r, $bool;
!             foreach (@_) {
!                 print STDERR "$_ ", ($bool ? 'yes' : 'no'), "\n";
!                 push @r, $bool;
!             }
!             last;
!         }
!         else { die }
!     }
!     return @r;
  }
  
***************
*** 222,228 ****
  sub say( $$ )
  {
!         shift;
!         my $question = shift;
!         print STDERR "$question\n";
  }
  
--- 219,225 ----
  sub say( $$ )
  {
!     shift;
!     my $question = shift;
!     print STDERR "$question\n";
  }
  


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/