r54768 - in /branches/upstream/libipc-run-perl/current: ./ lib/IPC/ lib/IPC/Run/ t/

carnil-guest at users.alioth.debian.org carnil-guest at users.alioth.debian.org
Thu Mar 25 11:31:01 UTC 2010


Author: carnil-guest
Date: Thu Mar 25 11:30:13 2010
New Revision: 54768

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=54768
Log:
[svn-upgrade] Integrating new upstream version, libipc-run-perl (0.86)

Added:
    branches/upstream/libipc-run-perl/current/t/windows_search_path.t
Modified:
    branches/upstream/libipc-run-perl/current/Changes
    branches/upstream/libipc-run-perl/current/MANIFEST
    branches/upstream/libipc-run-perl/current/META.yml
    branches/upstream/libipc-run-perl/current/Makefile.PL
    branches/upstream/libipc-run-perl/current/lib/IPC/Run.pm
    branches/upstream/libipc-run-perl/current/lib/IPC/Run/Debug.pm
    branches/upstream/libipc-run-perl/current/lib/IPC/Run/IO.pm
    branches/upstream/libipc-run-perl/current/lib/IPC/Run/Timer.pm
    branches/upstream/libipc-run-perl/current/lib/IPC/Run/Win32Helper.pm
    branches/upstream/libipc-run-perl/current/lib/IPC/Run/Win32IO.pm
    branches/upstream/libipc-run-perl/current/lib/IPC/Run/Win32Pump.pm
    branches/upstream/libipc-run-perl/current/t/run.t

Modified: branches/upstream/libipc-run-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libipc-run-perl/current/Changes?rev=54768&op=diff
==============================================================================
--- branches/upstream/libipc-run-perl/current/Changes (original)
+++ branches/upstream/libipc-run-perl/current/Changes Thu Mar 25 11:30:13 2010
@@ -1,4 +1,14 @@
 Revision history for Perl extension IPC::Run
+
+0.86 Wed 24 Mar 2010
+  - Add all files to subversion for easier releases
+  - bump version on ALL files to 86
+
+0.85 Mon 22 Mar 2010
+  - Remove use UNIVERSAL. - RT 51509
+  - fix pod for Win32Helper - RT 51695
+  - Better PATHEXT logic bug if cmd_name contains periods - RT 50739
+  - Enhance tests for run.t for better diagnostics - RT 47630
 
 0.84 Mon 13 Jul 2009
 	- Add darwin to the list of known-bad platforms

Modified: branches/upstream/libipc-run-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libipc-run-perl/current/MANIFEST?rev=54768&op=diff
==============================================================================
--- branches/upstream/libipc-run-perl/current/MANIFEST (original)
+++ branches/upstream/libipc-run-perl/current/MANIFEST Thu Mar 25 11:30:13 2010
@@ -39,6 +39,7 @@
 t/signal.t
 t/timeout.t
 t/timer.t
+t/windows_search_path.t
 t/win32_compile.t
 TODO
 META.yml                                 Module meta-data (added by MakeMaker)

Modified: branches/upstream/libipc-run-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libipc-run-perl/current/META.yml?rev=54768&op=diff
==============================================================================
--- branches/upstream/libipc-run-perl/current/META.yml (original)
+++ branches/upstream/libipc-run-perl/current/META.yml Thu Mar 25 11:30:13 2010
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:               IPC-Run
-version:            0.84
+version:            0.86
 abstract:           system() and background procs w/ piping, redirs, ptys (Unix, Win32)
 author:  []
 license:            unknown
@@ -9,14 +9,25 @@
     ExtUtils::MakeMaker:  0
 build_requires:
     ExtUtils::MakeMaker:  0
+    Test::More:           0
 requires:
-    IO::Pty:     1.08
     Test::More:  0.47
+resources:
+    bugtracker:  https://rt.cpan.org/NoAuth/Bugs.html?Dist=IPC-Run
+    license:     http://dev.perl.org/licenses/
+    repository:  http://svn.ali.as/cpan/trunk/IPC-Run
 no_index:
     directory:
         - t
         - inc
-generated_by:       ExtUtils::MakeMaker version 6.50
+generated_by:       ExtUtils::MakeMaker version 6.56
 meta-spec:
     url:      http://module-build.sourceforge.net/META-spec-v1.4.html
     version:  1.4
+recommends:
+    IO::Pty:              0
+    Perl::MinimumVersion:  0
+    Pod::Simple:          0
+    Test::CPAN::Meta:     0
+    Test::MinimumVersion:  0
+    Test::Pod:            0

Modified: branches/upstream/libipc-run-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libipc-run-perl/current/Makefile.PL?rev=54768&op=diff
==============================================================================
--- branches/upstream/libipc-run-perl/current/Makefile.PL (original)
+++ branches/upstream/libipc-run-perl/current/Makefile.PL Thu Mar 25 11:30:13 2010
@@ -46,14 +46,34 @@
 	PREREQ_PM    => {
 		Test::More => '0.47',
 		%PREREQ_PM,
-	}
-);
+	},
+	META_MERGE  => {
+	    recommends => {
+		'Test::CPAN::Meta' => 0,
+		'Pod::Simple' =>  0,
+		'Test::Pod' => 0,
+		'Perl::MinimumVersion' => 0,
+		'Test::MinimumVersion' => 0,
+		'IO::Pty' => 0,
+	    },
+	    build_requires => {
+		'Test::More' => 0,  # For testing
+	    },
+	    resources => {
+		license => 'http://dev.perl.org/licenses/',
+#            homepage => 'http://',
+		bugtracker => 'https://rt.cpan.org/NoAuth/Bugs.html?Dist=IPC-Run',
+		repository => 'http://svn.ali.as/cpan/trunk/IPC-Run',
+#            MailingList => 'http://groups.google.com/group/IPC-Run',
+	    }
+	});
+	  
 
 sub MY::libscan {
 	package MY;
 	my $self = shift;
 	my ($path) = @_;
-	return '' if /\.sw[a-z]$/;
+	return '' if $path =~ m/\.sw[a-z]\z/msx;
 	return '' unless length $self->SUPER::libscan($path);
 	return $path;
 }

Modified: branches/upstream/libipc-run-perl/current/lib/IPC/Run.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libipc-run-perl/current/lib/IPC/Run.pm?rev=54768&op=diff
==============================================================================
--- branches/upstream/libipc-run-perl/current/lib/IPC/Run.pm (original)
+++ branches/upstream/libipc-run-perl/current/lib/IPC/Run.pm Thu Mar 25 11:30:13 2010
@@ -1011,7 +1011,7 @@
 use Exporter ();
 use vars qw{$VERSION @ISA @FILTER_IMP @FILTERS @API @EXPORT_OK %EXPORT_TAGS};
 BEGIN {
-	$VERSION = '0.84';
+	$VERSION = '0.86';
 	@ISA     = qw{ Exporter };
 
 	## We use @EXPORT for the end user's convenience: there's only one function
@@ -1149,12 +1149,16 @@
 
    if ( Win32_MODE
       && ( $cmd_name =~ /$dirsep/ )
-      && ( $cmd_name !~ /\..+$/ )  ## Only run if cmd_name has no extension?
+#      && ( $cmd_name !~ /\..+$/ )  ## Only run if cmd_name has no extension?
+      && ( $cmd_name !~ m!\.[^\\/\.]+$! )
     ) {
+
+      _debug "no extension(.exe), checking ENV{PATHEXT}"  if _debugging;
       for ( split /;/, $ENV{PATHEXT} || ".COM;.BAT;.EXE" ) {
          my $name = "$cmd_name$_";
          $cmd_name = $name, last if -f $name && -x _;
       }
+      _debug "cmd_name is now '$cmd_name'"  if _debugging;
    }
 
    if ( $cmd_name =~ /($dirsep)/ ) {

Modified: branches/upstream/libipc-run-perl/current/lib/IPC/Run/Debug.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libipc-run-perl/current/lib/IPC/Run/Debug.pm?rev=54768&op=diff
==============================================================================
--- branches/upstream/libipc-run-perl/current/lib/IPC/Run/Debug.pm (original)
+++ branches/upstream/libipc-run-perl/current/lib/IPC/Run/Debug.pm Thu Mar 25 11:30:13 2010
@@ -70,7 +70,7 @@
 use Exporter;
 use vars qw{$VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS};
 BEGIN {
-	$VERSION = '0.84';
+	$VERSION = '0.86';
 	@ISA     = qw( Exporter );
 	@EXPORT  = qw(
 		_debug
@@ -118,7 +118,6 @@
 STUBS
 
 use POSIX;
-use UNIVERSAL qw( isa );
 
 sub _map_fds {
    my $map = '';

Modified: branches/upstream/libipc-run-perl/current/lib/IPC/Run/IO.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libipc-run-perl/current/lib/IPC/Run/IO.pm?rev=54768&op=diff
==============================================================================
--- branches/upstream/libipc-run-perl/current/lib/IPC/Run/IO.pm (original)
+++ branches/upstream/libipc-run-perl/current/lib/IPC/Run/IO.pm Thu Mar 25 11:30:13 2010
@@ -76,14 +76,13 @@
 use Carp;
 use Fcntl;
 use Symbol;
-use UNIVERSAL ();
 
 use IPC::Run::Debug;
 use IPC::Run qw( Win32_MODE );
 
 use vars qw{$VERSION};
 BEGIN {
-	$VERSION = '0.84';
+	$VERSION = '0.86';
 	if ( Win32_MODE ) {
 		eval "use IPC::Run::Win32Helper; require IPC::Run::Win32IO; 1"
 		or ( $@ && die ) or die "$!";

Modified: branches/upstream/libipc-run-perl/current/lib/IPC/Run/Timer.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libipc-run-perl/current/lib/IPC/Run/Timer.pm?rev=54768&op=diff
==============================================================================
--- branches/upstream/libipc-run-perl/current/lib/IPC/Run/Timer.pm (original)
+++ branches/upstream/libipc-run-perl/current/lib/IPC/Run/Timer.pm Thu Mar 25 11:30:13 2010
@@ -163,7 +163,7 @@
 use Exporter;
 use vars qw( $VERSION @ISA @EXPORT_OK %EXPORT_TAGS );
 BEGIN {
-	$VERSION   = '0.84';
+	$VERSION   = '0.86';
 	@ISA       = qw( Exporter );
 	@EXPORT_OK = qw(
 		check

Modified: branches/upstream/libipc-run-perl/current/lib/IPC/Run/Win32Helper.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libipc-run-perl/current/lib/IPC/Run/Win32Helper.pm?rev=54768&op=diff
==============================================================================
--- branches/upstream/libipc-run-perl/current/lib/IPC/Run/Win32Helper.pm (original)
+++ branches/upstream/libipc-run-perl/current/lib/IPC/Run/Win32Helper.pm Thu Mar 25 11:30:13 2010
@@ -24,7 +24,7 @@
 use IO::Handle;
 use vars qw{ $VERSION @ISA @EXPORT };
 BEGIN {
-	$VERSION = '0.84';
+	$VERSION = '0.86';
 	@ISA = qw( Exporter );
 	@EXPORT = qw(
 		win32_spawn
@@ -103,7 +103,7 @@
 to a scalar or subroutine with or without filters, but only if
 the child in question closes its inputs or takes input from 
 unfiltered SCALARs or named files.  Normally, a child inherits its STDIN
-from its parent; to close it, use "0<&-" or the C<noinherit => 1> option.
+from its parent; to close it, use "0<&-" or the C<< noinherit => 1 >> option.
 If data is sent to the child from CODE refs, filehandles or from
 scalars through filters than the child's outputs will not be optimized
 because C<optimize()> assumes the parent is interacting with the child.

Modified: branches/upstream/libipc-run-perl/current/lib/IPC/Run/Win32IO.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libipc-run-perl/current/lib/IPC/Run/Win32IO.pm?rev=54768&op=diff
==============================================================================
--- branches/upstream/libipc-run-perl/current/lib/IPC/Run/Win32IO.pm (original)
+++ branches/upstream/libipc-run-perl/current/lib/IPC/Run/Win32IO.pm Thu Mar 25 11:30:13 2010
@@ -31,7 +31,7 @@
 
 use vars qw{$VERSION};
 BEGIN {
-	$VERSION = '0.84';
+	$VERSION = '0.86';
 }
 
 use Socket qw( IPPROTO_TCP TCP_NODELAY );

Modified: branches/upstream/libipc-run-perl/current/lib/IPC/Run/Win32Pump.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libipc-run-perl/current/lib/IPC/Run/Win32Pump.pm?rev=54768&op=diff
==============================================================================
--- branches/upstream/libipc-run-perl/current/lib/IPC/Run/Win32Pump.pm (original)
+++ branches/upstream/libipc-run-perl/current/lib/IPC/Run/Win32Pump.pm Thu Mar 25 11:30:13 2010
@@ -29,7 +29,7 @@
 use strict;
 use vars qw{$VERSION};
 BEGIN {
-	$VERSION = '0.84';
+	$VERSION = '0.86';
 }
 
 use Win32API::File qw(

Modified: branches/upstream/libipc-run-perl/current/t/run.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libipc-run-perl/current/t/run.t?rev=54768&op=diff
==============================================================================
--- branches/upstream/libipc-run-perl/current/t/run.t (original)
+++ branches/upstream/libipc-run-perl/current/t/run.t Thu Mar 25 11:30:13 2010
@@ -119,11 +119,15 @@
 }
 
 sub eok {
-   my ( $got, $exp ) = ( shift, shift );
+   my ( $got, $exp, $name ) = @_;
    $got =~ s/([\000-\037])/sprintf "\\0x%02x", ord $1/ge if defined $exp;
    $exp =~ s/([\000-\037])/sprintf "\\0x%02x", ord $1/ge if defined $exp;
-   @_ = ( $got, $exp, @_ );
-   goto &is;
+
+   my($pack, $file, $line) = caller();
+   $name ||= qq[eok at $file line $line];
+
+   local $Test::Builder::Level = $Test::Builder::Level + 1;
+   return is( $got, $exp, $name );
 }
 
 my $r;
@@ -288,7 +292,7 @@
 is( _map_fds, $fd_map );
 
 is( length $out, 20000 );
-ok( $out !~ /[^-]/ );
+unlike( $out, qr/[^-]/ );
 
 
 ##
@@ -301,7 +305,7 @@
    $in = "\n";
    $out = "";
    pump $h until length $out;
-   ok $out eq "\n";
+   is $out, "\n";
 
 
 
@@ -321,7 +325,7 @@
    $x = $@ if $ok_1 && ! $ok_2;
 
    if ( $ok_1 && $ok_2 ) {
-      ok $long_string eq $out;
+      is $long_string, $out;
    }
    else {
        $x =~ s/(x+)/sprintf "...%d \"x\" chars...", length $1/e;
@@ -607,12 +611,7 @@
    eval {
       $r = run \@perl, ">$out_file", "<$bad_file";
    };
-   if ( $@ =~ /\Q$bad_file\E/ ) {
-      ok 1;
-   }
-   else {
-      is $@, "qr/\Q$bad_file\E/";
-   }
+   like $@, qr/\Q$bad_file\E/;
 is( _map_fds, $fd_map );
 
 ##
@@ -686,7 +685,7 @@
    ok( $r );
 ok( ! $? );
 is( _map_fds, $fd_map );
-$out =~ /(?:$text){2}/i ? ok 1 : is $out, "qr/($text){2}/i";
+like $out, qr/(?:$text){2}/i;
 eok( $err, '' );
 
 ##
@@ -700,7 +699,7 @@
 ok( ! $? );
 is( _map_fds, $fd_map );
 
-ok( $out =~ qr/(?:$text){2}/i );
+like $out, qr/(?:$text){2}/i;
 
 ##
 ## Non-zero exit value, command with args, no redirects.
@@ -787,19 +786,19 @@
    ok( $r );
 ok( ! $? );
 is( _map_fds, $fd_map );
-ok( $out =~ qr/^(?:HELLO World\n|Hello world\n){2}\z/s );
-ok( $err =~ qr/^(?:[12]:Hello World.*){2}\z/s );
+like $out, qr/^(?:HELLO World\n|Hello world\n){2}$/s;
+like $err, qr/^(?:[12]:Hello World.*){2}$/s;
 
 ##
 ## A few error cases...
 ##
    eval { $r = run \@perl, '<', [], [] };
-   ok( $@ =~ qr/not allowed/ );
+   like( $@, qr/not allowed/ );
    eval { $r = run \@perl, '>', [], [] };
-   ok( $@ =~ qr/not allowed/ );
+   like( $@, qr/not allowed/ );
    foreach my $foo ( qw( | & < > >& 1>&2 >file <file 2<&1 <&- 3<&- ) ) {
       eval { $r = run $foo, [] };
-      ok( $@ =~ qr/command/ );
+      like( $@, qr/command/ );
    }
    $out = 'REPLACE ME';
    $err = 'REPLACE ME';
@@ -844,7 +843,7 @@
       [ @perl, '-pe', 'BEGIN { $| = 1 } print STDERR uc($_)' ],
       \$in, \$out, \$err,
    );
-   ok( $h->isa('IPC::Run') );
+   isa_ok( $h, 'IPC::Run' );
 is( $?, 99 );
 
 eok( $in,  'SHOULD BE UNCHANGED' );
@@ -855,7 +854,7 @@
    $in  = '';
    $? = 0;
    pump_nb $h for ( 1..100 );
-   ok( 1 );
+   pass( "after pump_nb" );
 eok( $in, '' );
 eok( $out, '' );
 eok( $err, '' );
@@ -864,7 +863,7 @@
    $in  = $text;
    $? = 0;
    pump $h until $out =~ /Hello World/;
-   ok( 1 );
+   pass("after pump");
 ok( ! $? );
 eok( $in, '' );
 eok( $out, $text );

Added: branches/upstream/libipc-run-perl/current/t/windows_search_path.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libipc-run-perl/current/t/windows_search_path.t?rev=54768&op=file
==============================================================================
--- branches/upstream/libipc-run-perl/current/t/windows_search_path.t (added)
+++ branches/upstream/libipc-run-perl/current/t/windows_search_path.t Thu Mar 25 11:30:13 2010
@@ -1,0 +1,51 @@
+#!perl -w
+
+use strict;
+use warnings;
+
+use Test::More tests => 11;
+use IPC::Run;
+
+{
+    no warnings;
+    sub IPC::Run::Win32_MODE {1}
+}
+
+is(IPC::Run::Win32_MODE, 1, "We're win32 mode?");
+$^O = 'Win32';
+
+# Proves that files in subdirs with . still work.
+mkdir '5.11.5';
+my @tests = qw(
+		./temp ./temp.EXE
+		.\\temp .\\temp.EXE
+		./5.11.5/temp ./5.11.5/temp.EXE
+        ./5.11.5/temp ./5.11.5/temp.BAT
+        ./5.11.5/temp ./5.11.5/temp.COM
+        
+	     );
+
+while(@tests) {
+    my $path = shift @tests;
+    my $result = shift @tests;
+    
+    touch($result);
+    my $got = eval { IPC::Run::_search_path($path) }; 
+    is($@, '', "No error calling _search_path for '$path'");
+    is($got, $result, "Executable $result found");
+    unlink $result;
+}
+
+exit;
+
+sub touch {
+    my $file = shift;
+    open(FH, ">$file") or die;
+    print FH 1 or die;
+    close FH or die;
+    chmod(0700, $file) or die;
+}
+
+sub END {
+    rmdir('5.11.5');
+}




More information about the Pkg-perl-cvs-commits mailing list