r44269 - in /branches/upstream/libfile-which-perl/current: Changes MANIFEST META.yml Makefile.PL lib/File/Which.pm script/pwhich t/01_compile.t t/04_pwhich.t

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Sat Sep 19 03:51:08 UTC 2009


Author: jawnsy-guest
Date: Sat Sep 19 03:51:03 2009
New Revision: 44269

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=44269
Log:
[svn-upgrade] Integrating new upstream version, libfile-which-perl (1.08)

Added:
    branches/upstream/libfile-which-perl/current/t/04_pwhich.t
Modified:
    branches/upstream/libfile-which-perl/current/Changes
    branches/upstream/libfile-which-perl/current/MANIFEST
    branches/upstream/libfile-which-perl/current/META.yml
    branches/upstream/libfile-which-perl/current/Makefile.PL
    branches/upstream/libfile-which-perl/current/lib/File/Which.pm
    branches/upstream/libfile-which-perl/current/script/pwhich
    branches/upstream/libfile-which-perl/current/t/01_compile.t

Modified: branches/upstream/libfile-which-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-which-perl/current/Changes?rev=44269&op=diff
==============================================================================
--- branches/upstream/libfile-which-perl/current/Changes (original)
+++ branches/upstream/libfile-which-perl/current/Changes Sat Sep 19 03:51:03 2009
@@ -1,4 +1,9 @@
 Revision history for File::Which.
+
+1.08 Tue 15 Sep 2009
+	- Fixing pwhich
+	- Adding a proper test for it
+	- Adds a dependency on Test::Script 1.08
 
 1.07 Tue 28 Jul 2009
 	- CPAN Testers looks good for 1.06_01, moving to production release

Modified: branches/upstream/libfile-which-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-which-perl/current/MANIFEST?rev=44269&op=diff
==============================================================================
--- branches/upstream/libfile-which-perl/current/MANIFEST (original)
+++ branches/upstream/libfile-which-perl/current/MANIFEST Sat Sep 19 03:51:03 2009
@@ -8,6 +8,7 @@
 t/01_compile.t
 t/02_all.t
 t/03_simple.t
+t/04_pwhich.t
 t/97_meta.t
 t/98_pod.t
 t/99_pmv.t

Modified: branches/upstream/libfile-which-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-which-perl/current/META.yml?rev=44269&op=diff
==============================================================================
--- branches/upstream/libfile-which-perl/current/META.yml (original)
+++ branches/upstream/libfile-which-perl/current/META.yml Sat Sep 19 03:51:03 2009
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:               File-Which
-version:            1.07
+version:            1.08
 abstract:           Portable implementation of the "which" utility
 author:
     - Adam Kennedy <adamk at cpan.org>
@@ -11,10 +11,11 @@
 build_requires:
     ExtUtils::MakeMaker:  0
 requires:
-    Exporter:     0
-    File::Spec:   0.60
-    Getopt::Std:  0
-    Test::More:   0.80
+    Exporter:      0
+    File::Spec:    0.60
+    Getopt::Std:   0
+    Test::More:    0.80
+    Test::Script:  1.05
 no_index:
     directory:
         - t

Modified: branches/upstream/libfile-which-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-which-perl/current/Makefile.PL?rev=44269&op=diff
==============================================================================
--- branches/upstream/libfile-which-perl/current/Makefile.PL (original)
+++ branches/upstream/libfile-which-perl/current/Makefile.PL Sat Sep 19 03:51:03 2009
@@ -7,10 +7,11 @@
 	'ABSTRACT'     => 'Portable implementation of the "which" utility',
 	'VERSION_FROM' => 'lib/File/Which.pm',
 	'PREREQ_PM'    => {
-		'Exporter'    => 0,
-		'Getopt::Std' => 0,
-		'File::Spec'  => '0.60',
-		'Test::More'  => '0.80',
+		'Exporter'     => 0,
+		'Getopt::Std'  => 0,
+		'File::Spec'   => '0.60',
+		'Test::More'   => '0.80',
+		'Test::Script' => '1.05',
 	},
 	'EXE_FILES' => [
 		'script/pwhich',

Modified: branches/upstream/libfile-which-perl/current/lib/File/Which.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-which-perl/current/lib/File/Which.pm?rev=44269&op=diff
==============================================================================
--- branches/upstream/libfile-which-perl/current/lib/File/Which.pm (original)
+++ branches/upstream/libfile-which-perl/current/lib/File/Which.pm Sat Sep 19 03:51:03 2009
@@ -7,7 +7,7 @@
 
 use vars qw{$VERSION @ISA @EXPORT @EXPORT_OK};
 BEGIN {
-	$VERSION   = '1.07';
+	$VERSION   = '1.08';
 	@ISA       = 'Exporter';
 	@EXPORT    = 'which';
 	@EXPORT_OK = 'where';

Modified: branches/upstream/libfile-which-perl/current/script/pwhich
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-which-perl/current/script/pwhich?rev=44269&op=diff
==============================================================================
--- branches/upstream/libfile-which-perl/current/script/pwhich (original)
+++ branches/upstream/libfile-which-perl/current/script/pwhich Sat Sep 19 03:51:03 2009
@@ -7,7 +7,7 @@
 
 use vars qw{$VERSION};
 BEGIN {
-	$VERSION = '1.07';
+	$VERSION = '1.08';
 }
 
 # Handle options
@@ -26,7 +26,7 @@
 it under the same terms as Perl itself.
 END_TEXT
 
-	exit;
+	exit(0);
 }
 
 unless ( @ARGV ) {
@@ -37,24 +37,27 @@
 
 END_TEXT
 
-	exit;
+	exit(0);
 }
 
 foreach my $file ( @ARGV ) {
 	my @result = $opts{a}
-		? which($file)
+		? File::Which::which($file)
 		# Need to force scalar
-		: scalar which($file);
+		: scalar File::Which::which($file);
 
 	# We might end up with @result = (undef) -> 1 elem
 	@result = () unless defined $result[0];
 	foreach my $result ( @result ) {
 		print "$result\n" if $result;
 	}
-	print STDERR "pwhich: no $file in PATH\n" unless @result;
+	unless ( @result ) {
+		print STDERR "pwhich: no $file in PATH\n";
+		exit(255);
+	}
 }
 
-exit;
+exit(0);
 
 __END__
 

Modified: branches/upstream/libfile-which-perl/current/t/01_compile.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-which-perl/current/t/01_compile.t?rev=44269&op=diff
==============================================================================
--- branches/upstream/libfile-which-perl/current/t/01_compile.t (original)
+++ branches/upstream/libfile-which-perl/current/t/01_compile.t Sat Sep 19 03:51:03 2009
@@ -7,6 +7,8 @@
 	$^W = 1;
 }
 
-use Test::More tests => 1;
+use Test::More tests => 2;
+use Test::Script;
 
 use_ok( 'File::Which' );
+script_compiles('script/pwhich');

Added: branches/upstream/libfile-which-perl/current/t/04_pwhich.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-which-perl/current/t/04_pwhich.t?rev=44269&op=file
==============================================================================
--- branches/upstream/libfile-which-perl/current/t/04_pwhich.t (added)
+++ branches/upstream/libfile-which-perl/current/t/04_pwhich.t Sat Sep 19 03:51:03 2009
@@ -1,0 +1,26 @@
+#!/usr/bin/perl
+
+# Check the pwhich script by confirming it matches the function result
+
+use strict;
+BEGIN {
+	$|  = 1;
+	$^W = 1;
+}
+
+use Test::More tests => 4;
+use Test::Script;
+use File::Which;
+
+# Look for a very common program
+my $tool = 'perl';
+my $path = which($tool);
+ok( defined $path, "Found path to $tool" );
+ok( $path, "Found path to $tool" );
+ok( -f $path, "$tool exists" );
+
+# Can we find the tool with the command line version?
+script_runs(
+	[ 'script/pwhich', 'perl' ],
+	'Found perl with pwhich',
+);




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