]> git.donarmstrong.com Git - term-progressbar.git/blobdiff - t/test.pm
remove commented code
[term-progressbar.git] / t / test.pm
index 1e6540f1634be5f5a3acc8c976074e0dff9f5a34..f00bc025784d606a6df3ee4c1a982c8bc660fbe9 100644 (file)
--- a/t/test.pm
+++ b/t/test.pm
@@ -47,10 +47,6 @@ Setting up the environment includes:
 
 =item Prepending F<blib/script> onto the path
 
-=item Pushing the module F<lib/> dir onto the @PERL5LIB var
-
-For executed scripts.
-
 =item Pushing the module F<lib/> dir onto the @INC var
 
 For internal C<use> calls.
@@ -86,8 +82,6 @@ The following symbols are exported upon request:
 
 =over 4
 
-=item LIB_DIR
-
 =item check_req
 
 =item compare
@@ -106,21 +100,18 @@ The following symbols are exported upon request:
 
 =item find_exec
 
-=item read_file
-
 =back
 
 =cut
 
-@EXPORT_OK = qw( LIB_DIR
-                 check_req compare evcheck find_exec only_files read_file
+@EXPORT_OK = qw( check_req compare evcheck only_files 
                  save_output restore_output tempdir tmpnam );
 
 # Utility -----------------------------
 
 use Carp                          qw( carp croak );
 use Cwd                      2.01 qw( cwd );
-use Env                           qw( PATH PERL5LIB );
+use Env                           qw( PATH );
 use Fatal                    1.02 qw( close open seek sysopen unlink );
 use Fcntl                    1.03 qw( :DEFAULT );
 use File::Basename                qw( basename );
@@ -169,8 +160,6 @@ sub min {
 # PACKAGE CONSTANTS
 # -------------------------------------
 
-use constant LIB_DIR  => catdir $Bin, updir, 'lib';
-
 use constant BUILD_SCRIPT_DIR => => catdir $Bin, updir, qw( blib script );
 
 sub find_exec {
@@ -188,11 +177,6 @@ sub find_exec {
 # PACKAGE ACTIONS
 # -------------------------------------
 
-# @PERL5LIB not available in Env for perl 5.00503
-# unshift @PERL5LIB, LIB_DIR;
-$PERL5LIB = defined $PERL5LIB ? join(':', LIB_DIR, $PERL5LIB) : LIB_DIR;
-unshift @INC,      LIB_DIR;
-
 $PATH = join ':', BUILD_SCRIPT_DIR, split /:/, $PATH;
 
 $_ = rel2abs($_)
@@ -642,43 +626,6 @@ is equal.  If the sort flag is present, each file is sorted prior to comparison.
 
 =cut
 
-#XYZ sub _run {
-#XYZ   my ($cmd, $name, $in) = @_;
-#XYZ
-#XYZ   my $infn = defined $in ? tmpnam : '/dev/null';
-#XYZ   my $outfn = tmpnam;
-#XYZ   my $errfn = tmpnam;
-#XYZ
-#XYZ   my $pid = fork;
-#XYZ   croak "Couldn't fork: $!\n"
-#XYZ     unless defined $pid;
-#XYZ
-#XYZ   if ( $pid == 0 ) { # Child
-#XYZ     open STDOUT, '>', $outfn;
-#XYZ     open STDERR, '>', $errfn;
-#XYZ     open STDIN,  '<', $infn;
-#XYZ
-#XYZ     exec @$cmd;
-#XYZ   }
-#XYZ
-#XYZ   my $rv = waitpid $pid, 0;
-#XYZ   my $status = $?;
-#XYZ
-#XYZ   croak "Unexpected waitpid return from child $name: $rv (expected $pid)\n"
-#XYZ     unless $rv == $pid;
-#XYZ
-#XYZ   local $/ = undef;
-#XYZ   local (OUT, ERR);
-#XYZ   open *OUT, '<', $outfn;
-#XYZ   open *ERR, '<', $errfn;
-#XYZ   my $out = <OUT>;
-#XYZ   my $err = <ERR>;
-#XYZ   close *OUT;
-#XYZ   close *ERR;
-#XYZ
-#XYZ   return $status >> 8, $status & 127, $status & 128 , $out, $err
-#XYZ }
-
 # return codes and old-style call semantics left for backwards compatibility
 BEGIN {
   my $savewarn = $SIG{__WARN__};
@@ -1075,56 +1022,6 @@ nothing, if no such file exists.
 
 # defined further up to use in constants
 
-# -------------------------------------
-
-=head2 read_file
-
-=over 4
-
-=item ARGUMENTS
-
-=over 4
-
-=item filename
-
-B<Mandatory>
-
-=item line-terminator
-
-B<Optional>.  Value of C<$/>.  Defaults to C<"\n">.
-
-=back
-
-=item RETURNS
-
-=over 4
-
-=item lines
-
-A list of lines in the file (lines determined by the value of
-line-terminator), as an arrayref.
-
-=back
-
-=back
-
-=cut
-
-sub read_file {
-  my ($fn, $term) = @_;
-
-  $term = "\n"
-    unless defined $term;
-
-  my $fh = do { local *F; *F };
-  sysopen $fh, $fn, O_RDONLY;
-  local $/ = $term;
-  my @lines = <$fh>;
-  close $fh;
-
-  return \@lines;
-}
-
 # ----------------------------------------------------------------------------
 
 =head1 EXAMPLES