diff -ur Shell-POSIX-Select-0.05/Changes Shell-POSIX-Select-0.06/Changes
--- Shell-POSIX-Select-0.05/Changes	Sun May 11 23:09:41 2003
+++ Shell-POSIX-Select-0.06/Changes	Tue Aug 11 22:19:37 2009
@@ -28,3 +28,10 @@
 		- removed large chunks of commented-out code, no longer needed
 		- dumbed-down the markup for SYNOPSIS in documentation, which the 
 				PAUSE version of pod2html was not handling correctly correctly.
+
+0.06  Tue Aug 11 15:28:50 CET 2009
+		changes by Przemek Czerkas <pczerkas@gmail.com>:
+		- fixed module and test.pl suite to work on MSWin32 platform
+		- explicit dependency on Text::Balanced 1.97 and Filter::Simple 0.84
+		- added more tests
+		- refreshed documentation
diff -ur Shell-POSIX-Select-0.05/MANIFEST Shell-POSIX-Select-0.06/MANIFEST
--- Shell-POSIX-Select-0.05/MANIFEST	Mon May 12 00:52:19 2003
+++ Shell-POSIX-Select-0.06/MANIFEST	Tue Aug 11 23:08:40 2009
@@ -1,19 +1,18 @@
-Changes
-Makefile.PL
-MANIFEST
-README
-test.pl
-Select.pm
-Makefile.PL
 browse_images.0
 browse_images.plx.PL
 browse_records.0
 browse_records.plx.PL
+Changes
+Compile_Bugs/dual_select
+Compile_Bugs/require
 delete_file.0
 delete_file.plx.PL
 lc_filename.0
 lc_filename.plx.PL
 long_listem.0
+long_listem.plx.PL
+Makefile.PL
+MANIFEST			This list of files
 menu_ls.0
 menu_ls.plx.PL
 order.0
@@ -24,14 +23,16 @@
 pick.plx.PL
 pick_file.0
 pick_file.plx.PL
-Compile_Bugs/dual_select
-Compile_Bugs/require
+README
 Ref_Data/alldefaults.cdump_ref
 Ref_Data/argv_heading.cdump_ref
 Ref_Data/arrayvar.cdump_ref
 Ref_Data/badvar.cdump_ref
 Ref_Data/eslect.cdump_ref
+Ref_Data/eslect_fixed.cdump_ref
+Ref_Data/failure_to_identify_loops.cdump_ref
 Ref_Data/localvar.cdump_ref
+Ref_Data/loop_variable_names.cdump_ref
 Ref_Data/myvar.cdump_ref
 Ref_Data/nested2a.cdump_ref
 Ref_Data/nested2b.cdump_ref
@@ -39,26 +40,29 @@
 Ref_Data/nested_heading_prompt.cdump_ref
 Ref_Data/no_decl_var.cdump_ref
 Ref_Data/novar.cdump_ref
+Ref_Data/other_select1.cdump_ref
+Ref_Data/other_select2.cdump_ref
 Ref_Data/ourvar.cdump_ref
 Ref_Data/prompt.nested.cdump_ref
 Ref_Data/refvar.cdump_ref
 Ref_Data/reply.cdump_ref
 Ref_Data/select2foreach.cdump_ref
+Ref_Data/stderr.cdump_ref
+Ref_Data/stdout.cdump_ref
 Ref_Data/sub2.cdump_ref
 Scripts/README
 Scripts/SCRIPTS.rme
-Scripts/file1.py
-Scripts/file2.py
-Test_Progs/HIDE/other_select1
-Test_Progs/HIDE/other_select2
-Test_Progs/HIDE/stderr
-Test_Progs/HIDE/stdout
+Select.pm
+test.pl
 Test_Progs/alldefaults
 Test_Progs/argv_heading
 Test_Progs/arrayvar
 Test_Progs/badvar
 Test_Progs/eslect
+Test_Progs/eslect_fixed
+Test_Progs/failure_to_identify_loops
 Test_Progs/localvar
+Test_Progs/loop_variable_names
 Test_Progs/myvar
 Test_Progs/nested2a
 Test_Progs/nested2b
@@ -67,11 +71,15 @@
 Test_Progs/no_decl_var
 Test_Progs/novar
 Test_Progs/options1.bogus
+Test_Progs/other_select1
 Test_Progs/other_select1.cdump
 Test_Progs/other_select1.sdump
+Test_Progs/other_select2
 Test_Progs/ourvar
 Test_Progs/prompt.nested
 Test_Progs/refvar
 Test_Progs/reply
 Test_Progs/select2foreach
+Test_Progs/stderr
+Test_Progs/stdout
 Test_Progs/sub2
diff -ur Shell-POSIX-Select-0.05/Makefile.PL Shell-POSIX-Select-0.06/Makefile.PL
--- Shell-POSIX-Select-0.05/Makefile.PL	Mon May  5 20:54:35 2003
+++ Shell-POSIX-Select-0.06/Makefile.PL	Tue Aug 11 13:24:38 2009
@@ -6,8 +6,8 @@
     'VERSION_FROM'	=> 'Select.pm', # finds $VERSION
     'PREREQ_PM'		=> { 
 					File::Spec::Functions => 0 ,
-					Filter::Simple => 0 ,
-			    Text::Balanced => 1.89 ,
+					Filter::Simple => 0.84 ,
+			    Text::Balanced => 1.97 ,
 			    Carp => 0 
 			    }, # e.g., Module::Name => 1.1
 #		'PL_FILES' => {
diff -ur Shell-POSIX-Select-0.05/README Shell-POSIX-Select-0.06/README
--- Shell-POSIX-Select-0.05/README	Fri May  9 00:09:48 2003
+++ Shell-POSIX-Select-0.06/README	Tue Aug 11 17:12:47 2009
@@ -1,4 +1,4 @@
-                Shell/POSIX/Select version 0.05
+                Shell/POSIX/Select version 0.06
                 ===============================
 
 INSTALLATION
diff -ur Shell-POSIX-Select-0.05/Ref_Data/alldefaults.cdump_ref Shell-POSIX-Select-0.06/Ref_Data/alldefaults.cdump_ref
--- Shell-POSIX-Select-0.05/Ref_Data/alldefaults.cdump_ref	Mon May 12 00:51:52 2003
+++ Shell-POSIX-Select-0.06/Ref_Data/alldefaults.cdump_ref	Tue Aug 11 16:59:35 2009
@@ -1,6 +1,6 @@
 
 
-	# Code generated by Shell::POSIX::Select v0.05, by tim(AT)TeachMePerl.com
+	# Code generated by Shell::POSIX::Select v0.06, by tim(AT)TeachMePerl.com
 	# NOTA BENE: Line 1 of this segment must start with {, so user can LABEL it
   { # **** NEW WRAPPER SCOPE FOR SELECTLOOP #1 ****
 		$Shell::POSIX::Select::DEBUG > 1 and 1 == 1 and
Binary files Shell-POSIX-Select-0.05/Ref_Data/argv_heading.cdump_ref and Shell-POSIX-Select-0.06/Ref_Data/argv_heading.cdump_ref differ
diff -ur Shell-POSIX-Select-0.05/Ref_Data/arrayvar.cdump_ref Shell-POSIX-Select-0.06/Ref_Data/arrayvar.cdump_ref
--- Shell-POSIX-Select-0.05/Ref_Data/arrayvar.cdump_ref	Mon May 12 00:51:53 2003
+++ Shell-POSIX-Select-0.06/Ref_Data/arrayvar.cdump_ref	Tue Aug 11 16:59:35 2009
@@ -1,6 +1,6 @@
 
 
-	# Code generated by Shell::POSIX::Select v0.05, by tim(AT)TeachMePerl.com
+	# Code generated by Shell::POSIX::Select v0.06, by tim(AT)TeachMePerl.com
 	# NOTA BENE: Line 1 of this segment must start with {, so user can LABEL it
   { # **** NEW WRAPPER SCOPE FOR SELECTLOOP #1 ****
 		$Shell::POSIX::Select::DEBUG > 1 and 1 == 1 and
diff -ur Shell-POSIX-Select-0.05/Ref_Data/badvar.cdump_ref Shell-POSIX-Select-0.06/Ref_Data/badvar.cdump_ref
--- Shell-POSIX-Select-0.05/Ref_Data/badvar.cdump_ref	Mon May 12 00:51:54 2003
+++ Shell-POSIX-Select-0.06/Ref_Data/badvar.cdump_ref	Tue Aug 11 16:59:35 2009
@@ -1,6 +1,6 @@
 
 
-	# Code generated by Shell::POSIX::Select v0.05, by tim(AT)TeachMePerl.com
+	# Code generated by Shell::POSIX::Select v0.06, by tim(AT)TeachMePerl.com
 	# NOTA BENE: Line 1 of this segment must start with {, so user can LABEL it
   { # **** NEW WRAPPER SCOPE FOR SELECTLOOP #1 ****
 		$Shell::POSIX::Select::DEBUG > 1 and 1 == 1 and
Binary files Shell-POSIX-Select-0.05/Ref_Data/eslect.cdump_ref and Shell-POSIX-Select-0.06/Ref_Data/eslect.cdump_ref differ
Only in Shell-POSIX-Select-0.06/Ref_Data: eslect_fixed.cdump_ref
Only in Shell-POSIX-Select-0.06/Ref_Data: failure_to_identify_loops.cdump_ref
diff -ur Shell-POSIX-Select-0.05/Ref_Data/localvar.cdump_ref Shell-POSIX-Select-0.06/Ref_Data/localvar.cdump_ref
--- Shell-POSIX-Select-0.05/Ref_Data/localvar.cdump_ref	Mon May 12 00:51:55 2003
+++ Shell-POSIX-Select-0.06/Ref_Data/localvar.cdump_ref	Tue Aug 11 16:59:35 2009
@@ -1,6 +1,6 @@
 
 
-	# Code generated by Shell::POSIX::Select v0.05, by tim(AT)TeachMePerl.com
+	# Code generated by Shell::POSIX::Select v0.06, by tim(AT)TeachMePerl.com
 	# NOTA BENE: Line 1 of this segment must start with {, so user can LABEL it
   { # **** NEW WRAPPER SCOPE FOR SELECTLOOP #1 ****
 		$Shell::POSIX::Select::DEBUG > 1 and 1 == 1 and
Only in Shell-POSIX-Select-0.06/Ref_Data: loop_variable_names.cdump_ref
diff -ur Shell-POSIX-Select-0.05/Ref_Data/myvar.cdump_ref Shell-POSIX-Select-0.06/Ref_Data/myvar.cdump_ref
--- Shell-POSIX-Select-0.05/Ref_Data/myvar.cdump_ref	Mon May 12 00:51:56 2003
+++ Shell-POSIX-Select-0.06/Ref_Data/myvar.cdump_ref	Tue Aug 11 16:59:35 2009
@@ -1,6 +1,6 @@
 
 
-	# Code generated by Shell::POSIX::Select v0.05, by tim(AT)TeachMePerl.com
+	# Code generated by Shell::POSIX::Select v0.06, by tim(AT)TeachMePerl.com
 	# NOTA BENE: Line 1 of this segment must start with {, so user can LABEL it
   { # **** NEW WRAPPER SCOPE FOR SELECTLOOP #1 ****
 		$Shell::POSIX::Select::DEBUG > 1 and 1 == 1 and
diff -ur Shell-POSIX-Select-0.05/Ref_Data/nested2a.cdump_ref Shell-POSIX-Select-0.06/Ref_Data/nested2a.cdump_ref
--- Shell-POSIX-Select-0.05/Ref_Data/nested2a.cdump_ref	Mon May 12 00:51:57 2003
+++ Shell-POSIX-Select-0.06/Ref_Data/nested2a.cdump_ref	Tue Aug 11 16:59:35 2009
@@ -1,6 +1,6 @@
 
 
-	# Code generated by Shell::POSIX::Select v0.05, by tim(AT)TeachMePerl.com
+	# Code generated by Shell::POSIX::Select v0.06, by tim(AT)TeachMePerl.com
 	# NOTA BENE: Line 1 of this segment must start with {, so user can LABEL it
   { # **** NEW WRAPPER SCOPE FOR SELECTLOOP #1 ****
 		$Shell::POSIX::Select::DEBUG > 1 and 1 == 1 and
@@ -128,7 +128,7 @@
 
         # USER'S LOOP-BLOCK BELOW
          
-	# Code generated by Shell::POSIX::Select v0.05, by tim(AT)TeachMePerl.com
+	# Code generated by Shell::POSIX::Select v0.06, by tim(AT)TeachMePerl.com
 	# NOTA BENE: Line 1 of this segment must start with {, so user can LABEL it
   { # **** NEW WRAPPER SCOPE FOR SELECTLOOP #2 ****
 		$Shell::POSIX::Select::DEBUG > 1 and 2 == 1 and
Binary files Shell-POSIX-Select-0.05/Ref_Data/nested2b.cdump_ref and Shell-POSIX-Select-0.06/Ref_Data/nested2b.cdump_ref differ
Binary files Shell-POSIX-Select-0.05/Ref_Data/nested2c.cdump_ref and Shell-POSIX-Select-0.06/Ref_Data/nested2c.cdump_ref differ
Binary files Shell-POSIX-Select-0.05/Ref_Data/nested_heading_prompt.cdump_ref and Shell-POSIX-Select-0.06/Ref_Data/nested_heading_prompt.cdump_ref differ
diff -ur Shell-POSIX-Select-0.05/Ref_Data/no_decl_var.cdump_ref Shell-POSIX-Select-0.06/Ref_Data/no_decl_var.cdump_ref
--- Shell-POSIX-Select-0.05/Ref_Data/no_decl_var.cdump_ref	Mon May 12 00:51:59 2003
+++ Shell-POSIX-Select-0.06/Ref_Data/no_decl_var.cdump_ref	Tue Aug 11 16:59:35 2009
@@ -1,6 +1,6 @@
 
 
-	# Code generated by Shell::POSIX::Select v0.05, by tim(AT)TeachMePerl.com
+	# Code generated by Shell::POSIX::Select v0.06, by tim(AT)TeachMePerl.com
 	# NOTA BENE: Line 1 of this segment must start with {, so user can LABEL it
   { # **** NEW WRAPPER SCOPE FOR SELECTLOOP #1 ****
 		$Shell::POSIX::Select::DEBUG > 1 and 1 == 1 and
diff -ur Shell-POSIX-Select-0.05/Ref_Data/novar.cdump_ref Shell-POSIX-Select-0.06/Ref_Data/novar.cdump_ref
--- Shell-POSIX-Select-0.05/Ref_Data/novar.cdump_ref	Mon May 12 00:52:00 2003
+++ Shell-POSIX-Select-0.06/Ref_Data/novar.cdump_ref	Tue Aug 11 16:59:35 2009
@@ -1,6 +1,6 @@
 
 
-	# Code generated by Shell::POSIX::Select v0.05, by tim(AT)TeachMePerl.com
+	# Code generated by Shell::POSIX::Select v0.06, by tim(AT)TeachMePerl.com
 	# NOTA BENE: Line 1 of this segment must start with {, so user can LABEL it
   { # **** NEW WRAPPER SCOPE FOR SELECTLOOP #1 ****
 		$Shell::POSIX::Select::DEBUG > 1 and 1 == 1 and
Only in Shell-POSIX-Select-0.06/Ref_Data: other_select1.cdump_ref
Only in Shell-POSIX-Select-0.06/Ref_Data: other_select2.cdump_ref
diff -ur Shell-POSIX-Select-0.05/Ref_Data/ourvar.cdump_ref Shell-POSIX-Select-0.06/Ref_Data/ourvar.cdump_ref
--- Shell-POSIX-Select-0.05/Ref_Data/ourvar.cdump_ref	Mon May 12 00:52:01 2003
+++ Shell-POSIX-Select-0.06/Ref_Data/ourvar.cdump_ref	Tue Aug 11 16:59:35 2009
@@ -1,6 +1,6 @@
 
 
-	# Code generated by Shell::POSIX::Select v0.05, by tim(AT)TeachMePerl.com
+	# Code generated by Shell::POSIX::Select v0.06, by tim(AT)TeachMePerl.com
 	# NOTA BENE: Line 1 of this segment must start with {, so user can LABEL it
   { # **** NEW WRAPPER SCOPE FOR SELECTLOOP #1 ****
 		$Shell::POSIX::Select::DEBUG > 1 and 1 == 1 and
Binary files Shell-POSIX-Select-0.05/Ref_Data/prompt.nested.cdump_ref and Shell-POSIX-Select-0.06/Ref_Data/prompt.nested.cdump_ref differ
Binary files Shell-POSIX-Select-0.05/Ref_Data/refvar.cdump_ref and Shell-POSIX-Select-0.06/Ref_Data/refvar.cdump_ref differ
Binary files Shell-POSIX-Select-0.05/Ref_Data/reply.cdump_ref and Shell-POSIX-Select-0.06/Ref_Data/reply.cdump_ref differ
diff -ur Shell-POSIX-Select-0.05/Ref_Data/select2foreach.cdump_ref Shell-POSIX-Select-0.06/Ref_Data/select2foreach.cdump_ref
--- Shell-POSIX-Select-0.05/Ref_Data/select2foreach.cdump_ref	Mon May 12 00:52:03 2003
+++ Shell-POSIX-Select-0.06/Ref_Data/select2foreach.cdump_ref	Tue Aug 11 16:59:35 2009
@@ -1,6 +1,6 @@
 
 
-	# Code generated by Shell::POSIX::Select v0.05, by tim(AT)TeachMePerl.com
+	# Code generated by Shell::POSIX::Select v0.06, by tim(AT)TeachMePerl.com
 	# NOTA BENE: Line 1 of this segment must start with {, so user can LABEL it
   { # **** NEW WRAPPER SCOPE FOR SELECTLOOP #1 ****
 		$Shell::POSIX::Select::DEBUG > 1 and 1 == 1 and
Only in Shell-POSIX-Select-0.06/Ref_Data: stderr.cdump_ref
Only in Shell-POSIX-Select-0.06/Ref_Data: stdout.cdump_ref
diff -ur Shell-POSIX-Select-0.05/Ref_Data/sub2.cdump_ref Shell-POSIX-Select-0.06/Ref_Data/sub2.cdump_ref
--- Shell-POSIX-Select-0.05/Ref_Data/sub2.cdump_ref	Mon May 12 00:52:04 2003
+++ Shell-POSIX-Select-0.06/Ref_Data/sub2.cdump_ref	Tue Aug 11 16:59:35 2009
@@ -1,7 +1,7 @@
 
 sub select_in_sub {
  	
-	# Code generated by Shell::POSIX::Select v0.05, by tim(AT)TeachMePerl.com
+	# Code generated by Shell::POSIX::Select v0.06, by tim(AT)TeachMePerl.com
 	# NOTA BENE: Line 1 of this segment must start with {, so user can LABEL it
   { # **** NEW WRAPPER SCOPE FOR SELECTLOOP #1 ****
 		$Shell::POSIX::Select::DEBUG > 1 and 1 == 1 and
Only in Shell-POSIX-Select-0.05/Scripts: file1.py
Only in Shell-POSIX-Select-0.05/Scripts: file2.py
diff -ur Shell-POSIX-Select-0.05/Select.pm Shell-POSIX-Select-0.06/Select.pm
--- Shell-POSIX-Select-0.05/Select.pm	Mon May 12 00:52:19 2003
+++ Shell-POSIX-Select-0.06/Select.pm	Tue Aug 11 23:21:00 2009
@@ -1,6 +1,6 @@
 package Shell::POSIX::Select;
 
-our $VERSION = '0.05';
+our $VERSION = '0.06';
 
 # Tim Maher, tim@teachmeperl.com, yumpy@cpan.org
 # Fri May  2 10:29:25 PDT 2003
@@ -40,7 +40,8 @@
 		exit 111;	# means, killed by signal
 	}; 
 	! defined $_import_called and $_import_called = 0;
-	( $script = $0 ) =~ s|^.*/||;
+	# cannot use $DIRSEP here
+	( $script = $0 ) =~ s|^.*[/\\]||;
 
 }
 
@@ -51,12 +52,11 @@
 # no strict 'refs';	# no problem now
 
 use File::Spec::Functions 0.7;
-# some bugs in F::S or its relatives, that can cause compilation errors here
-use Filter::Simple;
+use Filter::Simple 0.84;
 
 # Damian's been fixing bugs as I report them, so best to have recent version
 # This is the oldest version that I know works pretty well
-use Text::Balanced 1.89 qw(extract_variable extract_bracketed);
+use Text::Balanced 1.97 qw(extract_variable extract_bracketed);
 
 # I've done most testing with this as yet unrelased version
 # use Text::Balanced 1.90 qw(extract_variable extract_bracketed);
@@ -121,12 +121,12 @@
 
 $DEBUG >2 and warn "Import_called initially set to: $_import_called\n";
 
-FILTER_ONLY code => \&filter, all => sub {
+FILTER_ONLY code_no_comments => \&filter, all => sub {
 	$LOGGING and print SOURCE;
 };
 
 $DEBUG >2 and warn "Import_called set to: $_import_called\n";
-$DEBUG >2 and warn "testmode is $Shell::POSIX::Select::_testmode";
+$DEBUG >2 and $Shell::POSIX::Select::_testmode and warn "testmode is $Shell::POSIX::Select::_testmode";
 
 use re 'eval';
 
@@ -215,7 +215,7 @@
 				$DEBUG > 1 and show_subs("****** LOOKING FOR LOOP ****** #$loopnum\n","");
 				$loopnum > 5 and warn "$subname: Might be stuck in loop\n";
 				$loopnum > 10 and die "$subname: Probably was stuck in loop\n";
-				$DEBUG > 3 and warn "pos is currently: ", pos(), "\n";
+				$DEBUG > 3 and pos() and warn "pos is currently: ", pos(), "\n";
 				pos()=0;
 				/\S/ or $LOGGING and
 					print LOG "\$_ is all white space or else empty\n";
@@ -433,7 +433,7 @@
 		}
 	}
 
-	$loopnum > 1 and $Shell::POSIX::Select::filter_output=$_;
+	$loopnum > 0 and $Shell::POSIX::Select::filter_output=$_;
 		$LOGGING and print USERPROG $_;	# $_ unset 2nd call; label starts below
 		$DEBUG_FILT > 2 and _WARN "Leaving $subname on call #$::_FILTER_CALLS\n";
 	}	# end sub filter
@@ -1330,8 +1330,8 @@
 				die;
 			}
 			defined $Shell::POSIX::Select::filter_output and
-				print SOURCE $Shell::POSIX::Select::filter_output or 
-				die "$PKG-END(): Failed to write to '$cdump', $!\n";
+				(print SOURCE $Shell::POSIX::Select::filter_output or 
+				die "$PKG-END(): Failed to write to '$cdump', $!\n");
 #			system "ls -li $cdump $sdump";
 	}
 
@@ -1888,7 +1888,7 @@
 
  # Extract man-page names from the TOC portion of the output of "perldoc perl"
  select $manpage ( sort ( `perldoc perl` =~ /^\s+(perl\w+)\s/mg) ) {
-     system "perldoc '$manpage'" ;
+     system "perldoc $manpage" ;
  }
 
 B<Screen>
@@ -2213,78 +2213,6 @@
 F</tmp/SELECT_source> file.  Of course, if everything works correctly,
 you'll have little reason to look at the source. 8-}
 
-=head2 Comments can Interfere with Filtering
-
-Because of the way Filter::Simple works,
-ostensibly "commented-out" C<select> loops like the following
-can actually break your program:
-
- # select (@ARGV)
- # { ; }
- select (@ARGV) { ; }
-
-A future version of Filter::Simple
-(or more precisely Text::Balanced, on which on which it depends)
-may correct this problem.
-
-In any case, there's an easy workaround for the commented-out select
-loop problem; just
-change I<se>lect into I<es>lect when you comment it out, and there'll
-be no problem.
-
-For other problems involving troublesome text within comments, see 
-L<"Failure to Identify select Loops">.
-
-=head2 Failure to Identify C<select> Loops
-
-When a properly formed C<select> loop appears in certain contexts,
-such as before a line containing certain patterns of dollar signs
-or quotes,
-it will not be properly identified and translated into standard Perl.
-
-=begin comment
-
-The following is such an example:
-
-    use Shell::POSIX::Select;
-    select (@names) { print ; }
-    # $X$
-
-=end comment
-
-The failure of the filtering routine to rewrite the loop causes the
-compiler to issue the following fatal error when it sees the
-B<{> following the B<(LIST)>:
-	
-syntax error at I<filename> line I<X>, near ") {"
-
-This of course prevents the program from running.
-
-The problem is either a bug in Filter::Simple, or one of the modules on
-which it depends.
-Until this is resolved, you may be able to 
-handle such cases by explicitly turning filtering off before the offending
-code is encountered, using the B<no> directive:
-
-    use Shell::POSIX::Select;     # filtering ON
-    select (@names) { print ; }
-
-    no Shell::POSIX::Select;      # filtering OFF
-    # $X$
-
-=head2 Restrictions on Loop-variable Names
-
-Due to a bug in most versions of Text::Balanced,
-loop-variable names that look like Perl operators,
-including C<$m>, C<$a>, C<$s>, C<$y>, C<$tr>,
-C<$qq>, C<$qw>, C<$qr>, and C<$qx>, and possibly others,
-cause syntax errors.
-Newer
-versions of that module
-(unreleased at the time of this writing)
-have corrected this problem, 
-so download the latest version if you must use such names.
-
 =head2 Please Report Bugs!
 
 This is a non-trivial program, that does some fairly complex parsing
@@ -2398,7 +2326,7 @@
 
 =head1 VERSION
 
- This document describes version 0.05.
+ This document describes version 0.06.
 
 =head1 LICENSE
 
Only in Shell-POSIX-Select-0.05/Test_Progs: HIDE
Only in Shell-POSIX-Select-0.06/Test_Progs: eslect_fixed
Only in Shell-POSIX-Select-0.06/Test_Progs: failure_to_identify_loops
Only in Shell-POSIX-Select-0.06/Test_Progs: loop_variable_names
Only in Shell-POSIX-Select-0.06/Test_Progs: other_select1
Only in Shell-POSIX-Select-0.06/Test_Progs: other_select2
Only in Shell-POSIX-Select-0.06/Test_Progs: stderr
Only in Shell-POSIX-Select-0.06/Test_Progs: stdout
diff -ur Shell-POSIX-Select-0.05/browse_images.plx.PL Shell-POSIX-Select-0.06/browse_images.plx.PL
--- Shell-POSIX-Select-0.05/browse_images.plx.PL	Mon May  5 00:01:12 2003
+++ Shell-POSIX-Select-0.06/browse_images.plx.PL	Tue Aug 11 22:59:49 2009
@@ -0,0 +1,25 @@
+# Tim Maher
+
+# This script, script.pl.PL, is called by the Make system, with the name of the
+# script to be created, script.pl as its arg
+
+# the contents of script.pl, except for its shebang line, is in script.0,
+# which is inserted into script.pl by this script, script.pl.PL
+
+# NOTE: In this version, the *.0 an *.PL files are in the top-level
+# distribution directory, but the generated scripts appear under ./Scripts.
+# Sun May  4 17:01:10 PDT 2003
+
+use Config;
+
+$pl_file = shift;
+
+( $basename = $pl_file ) =~ s/\.plx$// or
+	die "$0: Bad scriptname argument; no .plx ending!\n";
+$file0="$basename.0";
+
+open IN,  "<  $file0" or die "Can't open $file0: $!";
+open OUT, "> Scripts/$pl_file" or die "Can't create $pl_file: $!";
+chmod (0755, "Scripts/$pl_file");
+
+print OUT $Config{startperl}, " -w\n", <IN>;
diff -ur Shell-POSIX-Select-0.05/browse_records.plx.PL Shell-POSIX-Select-0.06/browse_records.plx.PL
--- Shell-POSIX-Select-0.05/browse_records.plx.PL	Mon May  5 00:01:12 2003
+++ Shell-POSIX-Select-0.06/browse_records.plx.PL	Tue Aug 11 23:00:04 2009
@@ -0,0 +1,25 @@
+# Tim Maher
+
+# This script, script.pl.PL, is called by the Make system, with the name of the
+# script to be created, script.pl as its arg
+
+# the contents of script.pl, except for its shebang line, is in script.0,
+# which is inserted into script.pl by this script, script.pl.PL
+
+# NOTE: In this version, the *.0 an *.PL files are in the top-level
+# distribution directory, but the generated scripts appear under ./Scripts.
+# Sun May  4 17:01:10 PDT 2003
+
+use Config;
+
+$pl_file = shift;
+
+( $basename = $pl_file ) =~ s/\.plx$// or
+	die "$0: Bad scriptname argument; no .plx ending!\n";
+$file0="$basename.0";
+
+open IN,  "<  $file0" or die "Can't open $file0: $!";
+open OUT, "> Scripts/$pl_file" or die "Can't create $pl_file: $!";
+chmod (0755, "Scripts/$pl_file");
+
+print OUT $Config{startperl}, " -w\n", <IN>;
diff -ur Shell-POSIX-Select-0.05/delete_file.plx.PL Shell-POSIX-Select-0.06/delete_file.plx.PL
--- Shell-POSIX-Select-0.05/delete_file.plx.PL	Mon May  5 00:01:12 2003
+++ Shell-POSIX-Select-0.06/delete_file.plx.PL	Tue Aug 11 23:00:12 2009
@@ -0,0 +1,25 @@
+# Tim Maher
+
+# This script, script.pl.PL, is called by the Make system, with the name of the
+# script to be created, script.pl as its arg
+
+# the contents of script.pl, except for its shebang line, is in script.0,
+# which is inserted into script.pl by this script, script.pl.PL
+
+# NOTE: In this version, the *.0 an *.PL files are in the top-level
+# distribution directory, but the generated scripts appear under ./Scripts.
+# Sun May  4 17:01:10 PDT 2003
+
+use Config;
+
+$pl_file = shift;
+
+( $basename = $pl_file ) =~ s/\.plx$// or
+	die "$0: Bad scriptname argument; no .plx ending!\n";
+$file0="$basename.0";
+
+open IN,  "<  $file0" or die "Can't open $file0: $!";
+open OUT, "> Scripts/$pl_file" or die "Can't create $pl_file: $!";
+chmod (0755, "Scripts/$pl_file");
+
+print OUT $Config{startperl}, " -w\n", <IN>;
diff -ur Shell-POSIX-Select-0.05/lc_filename.plx.PL Shell-POSIX-Select-0.06/lc_filename.plx.PL
--- Shell-POSIX-Select-0.05/lc_filename.plx.PL	Mon May  5 00:01:12 2003
+++ Shell-POSIX-Select-0.06/lc_filename.plx.PL	Tue Aug 11 23:00:21 2009
@@ -0,0 +1,25 @@
+# Tim Maher
+
+# This script, script.pl.PL, is called by the Make system, with the name of the
+# script to be created, script.pl as its arg
+
+# the contents of script.pl, except for its shebang line, is in script.0,
+# which is inserted into script.pl by this script, script.pl.PL
+
+# NOTE: In this version, the *.0 an *.PL files are in the top-level
+# distribution directory, but the generated scripts appear under ./Scripts.
+# Sun May  4 17:01:10 PDT 2003
+
+use Config;
+
+$pl_file = shift;
+
+( $basename = $pl_file ) =~ s/\.plx$// or
+	die "$0: Bad scriptname argument; no .plx ending!\n";
+$file0="$basename.0";
+
+open IN,  "<  $file0" or die "Can't open $file0: $!";
+open OUT, "> Scripts/$pl_file" or die "Can't create $pl_file: $!";
+chmod (0755, "Scripts/$pl_file");
+
+print OUT $Config{startperl}, " -w\n", <IN>;
Only in Shell-POSIX-Select-0.06/: long_listem.plx.PL
diff -ur Shell-POSIX-Select-0.05/menu_ls.plx.PL Shell-POSIX-Select-0.06/menu_ls.plx.PL
--- Shell-POSIX-Select-0.05/menu_ls.plx.PL	Mon May  5 00:01:12 2003
+++ Shell-POSIX-Select-0.06/menu_ls.plx.PL	Tue Aug 11 23:38:42 2009
@@ -0,0 +1,25 @@
+# Tim Maher
+
+# This script, script.pl.PL, is called by the Make system, with the name of the
+# script to be created, script.pl as its arg
+
+# the contents of script.pl, except for its shebang line, is in script.0,
+# which is inserted into script.pl by this script, script.pl.PL
+
+# NOTE: In this version, the *.0 an *.PL files are in the top-level
+# distribution directory, but the generated scripts appear under ./Scripts.
+# Sun May  4 17:01:10 PDT 2003
+
+use Config;
+
+$pl_file = shift;
+
+( $basename = $pl_file ) =~ s/\.plx$// or
+	die "$0: Bad scriptname argument; no .plx ending!\n";
+$file0="$basename.0";
+
+open IN,  "<  $file0" or die "Can't open $file0: $!";
+open OUT, "> Scripts/$pl_file" or die "Can't create $pl_file: $!";
+chmod (0755, "Scripts/$pl_file");
+
+print OUT $Config{startperl}, " -w\n", <IN>;
diff -ur Shell-POSIX-Select-0.05/order.plx.PL Shell-POSIX-Select-0.06/order.plx.PL
--- Shell-POSIX-Select-0.05/order.plx.PL	Mon May  5 00:01:12 2003
+++ Shell-POSIX-Select-0.06/order.plx.PL	Tue Aug 11 23:00:35 2009
@@ -0,0 +1,25 @@
+# Tim Maher
+
+# This script, script.pl.PL, is called by the Make system, with the name of the
+# script to be created, script.pl as its arg
+
+# the contents of script.pl, except for its shebang line, is in script.0,
+# which is inserted into script.pl by this script, script.pl.PL
+
+# NOTE: In this version, the *.0 an *.PL files are in the top-level
+# distribution directory, but the generated scripts appear under ./Scripts.
+# Sun May  4 17:01:10 PDT 2003
+
+use Config;
+
+$pl_file = shift;
+
+( $basename = $pl_file ) =~ s/\.plx$// or
+	die "$0: Bad scriptname argument; no .plx ending!\n";
+$file0="$basename.0";
+
+open IN,  "<  $file0" or die "Can't open $file0: $!";
+open OUT, "> Scripts/$pl_file" or die "Can't create $pl_file: $!";
+chmod (0755, "Scripts/$pl_file");
+
+print OUT $Config{startperl}, " -w\n", <IN>;
diff -ur Shell-POSIX-Select-0.05/perl_man.0 Shell-POSIX-Select-0.06/perl_man.0
--- Shell-POSIX-Select-0.05/perl_man.0	Mon May  5 00:54:53 2003
+++ Shell-POSIX-Select-0.06/perl_man.0	Tue Aug 11 23:21:12 2009
@@ -7,5 +7,5 @@
 
 # Extract man-page names from the TOC portion of the output of "perldoc perl"
 select $manpage ( sort ( `perldoc perl` =~ /^\s+(perl\w+)\s/mg) ) {
-    system "perldoc '$manpage'" ;
+    system "perldoc $manpage" ;
 }
diff -ur Shell-POSIX-Select-0.05/pick.plx.PL Shell-POSIX-Select-0.06/pick.plx.PL
--- Shell-POSIX-Select-0.05/pick.plx.PL	Mon May  5 00:01:12 2003
+++ Shell-POSIX-Select-0.06/pick.plx.PL	Tue Aug 11 23:01:08 2009
@@ -0,0 +1,25 @@
+# Tim Maher
+
+# This script, script.pl.PL, is called by the Make system, with the name of the
+# script to be created, script.pl as its arg
+
+# the contents of script.pl, except for its shebang line, is in script.0,
+# which is inserted into script.pl by this script, script.pl.PL
+
+# NOTE: In this version, the *.0 an *.PL files are in the top-level
+# distribution directory, but the generated scripts appear under ./Scripts.
+# Sun May  4 17:01:10 PDT 2003
+
+use Config;
+
+$pl_file = shift;
+
+( $basename = $pl_file ) =~ s/\.plx$// or
+	die "$0: Bad scriptname argument; no .plx ending!\n";
+$file0="$basename.0";
+
+open IN,  "<  $file0" or die "Can't open $file0: $!";
+open OUT, "> Scripts/$pl_file" or die "Can't create $pl_file: $!";
+chmod (0755, "Scripts/$pl_file");
+
+print OUT $Config{startperl}, " -w\n", <IN>;
diff -ur Shell-POSIX-Select-0.05/pick_file.plx.PL Shell-POSIX-Select-0.06/pick_file.plx.PL
--- Shell-POSIX-Select-0.05/pick_file.plx.PL	Mon May  5 00:01:12 2003
+++ Shell-POSIX-Select-0.06/pick_file.plx.PL	Tue Aug 11 23:01:17 2009
@@ -0,0 +1,25 @@
+# Tim Maher
+
+# This script, script.pl.PL, is called by the Make system, with the name of the
+# script to be created, script.pl as its arg
+
+# the contents of script.pl, except for its shebang line, is in script.0,
+# which is inserted into script.pl by this script, script.pl.PL
+
+# NOTE: In this version, the *.0 an *.PL files are in the top-level
+# distribution directory, but the generated scripts appear under ./Scripts.
+# Sun May  4 17:01:10 PDT 2003
+
+use Config;
+
+$pl_file = shift;
+
+( $basename = $pl_file ) =~ s/\.plx$// or
+	die "$0: Bad scriptname argument; no .plx ending!\n";
+$file0="$basename.0";
+
+open IN,  "<  $file0" or die "Can't open $file0: $!";
+open OUT, "> Scripts/$pl_file" or die "Can't create $pl_file: $!";
+chmod (0755, "Scripts/$pl_file");
+
+print OUT $Config{startperl}, " -w\n", <IN>;
diff -ur Shell-POSIX-Select-0.05/test.pl Shell-POSIX-Select-0.06/test.pl
--- Shell-POSIX-Select-0.05/test.pl	Sun May 11 22:47:06 2003
+++ Shell-POSIX-Select-0.06/test.pl	Tue Aug 11 23:59:56 2009
@@ -26,7 +26,8 @@
 # Mon May  5 18:40:33 PDT 2003
 
 use File::Spec::Functions;
-use Test::Simple tests => 19 ;
+use Test::Simple tests => 26 ;
+use Config;
 
 # Was using Test::More, but it always exited at end with 255,
 # causing "make test" to look like it failed
@@ -40,7 +41,7 @@
 
 
 BEGIN {
-	$VERSION='0.05';
+	$VERSION='0.06';
 
 	# use Shell::POSIX::Select;	# use-ing modifies file handles, so avoid here
 	# require Shell::POSIX::Select;	# modifies file handles if "reference" set
@@ -77,7 +78,7 @@
 	# @testfiles = 'arrayvar';	# FOR TESTING ONLY
 
 	chomp @testfiles;
-	
+
 	if (! -d $ref_dir or ! -r _ or ! -w _ or ! -x _ ) {
 		mkdir $ref_dir or chmod 0755, $ref_dir or
 				die "$0: Failed to make $ref_dir\n";
@@ -94,7 +95,7 @@
 	print "\nMAKING REFERENCE DATA\n";
 	`uname -n` eq "guru\n"  or
 		die "Hey! Generating reference data is the author's domain\n";
-	
+
 	$ENV{PERL5LIB}="/Select";	# needed for test programs
 	# system 'echo PERL5LIB is: $PERL5LIB'; 
 	# system 'show_pmod_locus Shell::POSIX::Select'; 
@@ -153,7 +154,7 @@
 		if ($SCREENS) {
 			check_file ($screenR) or die "$screenR is bad\n";
 		}
-		
+
 		check_file ($codeR) and -s $codeR or die "$codeR is bad\n" ;
 		if ( $test_compile ) {
 			system "perl -wc '$codeR' 2>/tmp/$_.diag" ;
@@ -174,7 +175,7 @@
 
 print "TESTING GENERATED CODE AGAINST REFERENCE DATA\n\n";
 
-$ENV{PERL5LIB}="blib/lib:blib/arch:$PERL5LIB";	# needed for test programs
+$ENV{PERL5LIB}=join $Config{path_sep},'blib/lib','blib/arch',$PERL5LIB;	# needed for test programs
 
 # Configure ENV vars so module dumps the required data
 $ENV{Shell_POSIX_Select_reference}="";
@@ -193,6 +194,10 @@
 #	die "$0: Cannot load module under test\n";
 #require_ok('Shell::POSIX::Select');
 
+# Skip file-size tests if current IO layer 
+# has newlines that differ from the reference files
+$is_crlf=PerlIO::get_layers(STDOUT)=~/crlf/i;
+
 foreach (@testfiles) {
 	$DEBUG and warn "\nDumping data for $_\n";
 	if ($SCREENS) {
@@ -208,7 +213,7 @@
 	}
 	$script = catfile( 'Test_Progs', $_ );
 	# Later on, insert check for "*bogus" scripts to return error
-	system "perl '$script'" ;
+	system "perl $script" ;
 	$err=$?>>8;
 	# print "\t\t\t$script yielded $err\n";
 
@@ -224,20 +229,21 @@
 		# Keep the evidence for investigation
 		next;
 	}
+
 	# Do cheap file-size comp first; string comparison later if needed
-	if (-s $code != -s $codeR) {
+	if (!$is_crlf and -s $code != -s $codeR) {
 		warn "\t** Code dumps unequally sized for $_: ",
 			-s $code,  " vs. ", -s $codeR, "\n";
 		push @email_list,  "$code\n", "$codeR\n"; 
 		$DEBUG >2 and system "ls -li $code $codeR";
 		# fail ($code);	# force test to report failure
 	}
-	if ($SCREENS and -s $screen != -s $screenR) {
+	if (!$is_crlf and $SCREENS and -s $screen != -s $screenR) {
 		warn "\t** Screen dumps unequally sized for $_: ",
 			-s $screen,  " vs. ", -s $screenR, "\n";
 		push @email_list,  "$screen\n", "$screenR\n"; 
 		$DEBUG >2 and system "ls -li $screen $screenR";
-		fail ($screen);	# force tests to report failure
+		# fail ($screen);	# force tests to report failure
 	}
 	else {
 		# Files don't obviously differ, so next step is to compare bytes
@@ -255,7 +261,7 @@
 		# if ($_ =~ /bug$/) { warn "BUG FILE: $_\n"; }
 
 		$ret = ok ($NEW eq $REF, $code);  # logical and doesn't work!
-		$DEBUG > 0 and system ( "ls -ld $code $codeR" ) ;
+		$DEBUG >2 and system ( "ls -ld $code $codeR" ) ;
 		$ret or warn "Check $code for clues\n";
 		$ret and !$DEBUG and unlink $code;
 
@@ -264,7 +270,7 @@
 			defined ($REF=<S_REF>) or die "$0: Failed to read $screenR, $!\n";
 
 			$ret = ok ($NEW eq $REF, $screen);
-			$DEBUG > 0 and system ( "ls -ld $screen $screenR" ) ;
+			$DEBUG >2 and system ( "ls -ld $screen $screenR" ) ;
 			$ret or warn "Check $screen for clues\n" and exit;
 			$ret and !$DEBUG and unlink $screen;
 		}
