Hello community,
here is the log from the commit of package perl-File-Which for openSUSE:Factory checked in at 2019-01-05 14:41:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-File-Which (Old)
and /work/SRC/openSUSE:Factory/.perl-File-Which.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-File-Which"
Sat Jan 5 14:41:04 2019 rev:28 rq:662490 version:1.23
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-File-Which/perl-File-Which.changes 2017-09-15 21:01:56.466583450 +0200
+++ /work/SRC/openSUSE:Factory/.perl-File-Which.new.28833/perl-File-Which.changes 2019-01-05 14:41:05.560544703 +0100
@@ -1,0 +2,12 @@
+Tue Jan 1 06:23:46 UTC 2019 - Stephan Kulow
+
+- updated to 1.23
+ see /usr/share/doc/packages/perl-File-Which/Changes
+
+ 1.23 2018-12-31 14:28:16 -0500
+ - Internally use IS_WIN instead of IS_DOS for DOS/Windows style
+ operating systems. This is 2018 (almost 2019) after all.
+ IS_DOS is now an alias for IS_WIN, although these are not public
+ interfaces so you shouldn't be using them anyway.
+
+-------------------------------------------------------------------
Old:
----
File-Which-1.22.tar.gz
New:
----
File-Which-1.23.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-File-Which.spec ++++++
--- /var/tmp/diff_new_pack.c23RW3/_old 2019-01-05 14:41:06.048544289 +0100
+++ /var/tmp/diff_new_pack.c23RW3/_new 2019-01-05 14:41:06.048544289 +0100
@@ -1,7 +1,7 @@
#
# spec file for package perl-File-Which
#
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,18 +12,18 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: perl-File-Which
-Version: 1.22
+Version: 1.23
Release: 0
%define cpan_name File-Which
Summary: Perl implementation of the which utility as an API
-License: Artistic-1.0 or GPL-1.0+
+License: Artistic-1.0 OR GPL-1.0-or-later
Group: Development/Libraries/Perl
-Url: http://search.cpan.org/dist/File-Which/
+Url: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/P/PL/PLICEASE/%{cpan_name}-%{version}.tar.gz
Source1: cpanspec.yml
BuildArch: noarch
@@ -59,11 +59,11 @@
# MANUAL END
%build
-%{__perl} Makefile.PL INSTALLDIRS=vendor
-%{__make} %{?_smp_mflags}
+perl Makefile.PL INSTALLDIRS=vendor
+make %{?_smp_mflags}
%check
-%{__make} test
+make test
%install
%perl_make_install
++++++ File-Which-1.22.tar.gz -> File-Which-1.23.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-Which-1.22/Changes new/File-Which-1.23/Changes
--- old/File-Which-1.22/Changes 2017-09-08 20:09:02.000000000 +0200
+++ new/File-Which-1.23/Changes 2018-12-31 20:28:19.000000000 +0100
@@ -1,5 +1,11 @@
Revision history for File-Which
+1.23 2018-12-31 14:28:16 -0500
+ - Internally use IS_WIN instead of IS_DOS for DOS/Windows style
+ operating systems. This is 2018 (almost 2019) after all.
+ IS_DOS is now an alias for IS_WIN, although these are not public
+ interfaces so you shouldn't be using them anyway.
+
1.22 2017-09-08 14:08:59 -0400
- Support for MSYS2 ($^O eq 'msys')
@@ -122,4 +128,4 @@
0.01 Sun 14 Apr 2002
- original version; extracted from DocSet. Only plain which() with
- docs and tests.
+ docs and tests.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-Which-1.22/INSTALL new/File-Which-1.23/INSTALL
--- old/File-Which-1.22/INSTALL 2017-09-08 20:09:02.000000000 +0200
+++ new/File-Which-1.23/INSTALL 2018-12-31 20:28:19.000000000 +0100
@@ -22,7 +22,7 @@
## Manual installation
As a last resort, you can manually install it. Download the tarball, untar it,
-then build it:
+install configure prerequisites (see below), then build it:
% perl Makefile.PL
% make && make test
@@ -31,13 +31,42 @@
% make install
+On Windows platforms, you should use `dmake` or `nmake`, instead of `make`.
+
If your perl is system-managed, you can create a local::lib in your home
directory to install modules to. For details, see the local::lib documentation:
https://metacpan.org/pod/local::lib
+The prerequisites of this distribution will also have to be installed manually. The
+prerequisites are listed in one of the files: `MYMETA.yml` or `MYMETA.json` generated
+by running the manual build process described above.
+
+## Configure Prerequisites
+
+This distribution requires other modules to be installed before this
+distribution's installer can be run. They can be found under the
+"configure_requires" key of META.yml or the
+"{prereqs}{configure}{requires}" key of META.json.
+
+## Other Prerequisites
+
+This distribution may require additional modules to be installed after running
+Makefile.PL.
+Look for prerequisites in the following phases:
+
+* to run make, PHASE = build
+* to use the module code itself, PHASE = runtime
+* to run tests, PHASE = test
+
+They can all be found in the "PHASE_requires" key of MYMETA.yml or the
+"{prereqs}{PHASE}{requires}" key of MYMETA.json.
+
## Documentation
File-Which documentation is available as POD.
-You can run perldoc from a shell to read the documentation:
+You can run `perldoc` from a shell to read the documentation:
% perldoc File::Which
+
+For more information on installing Perl modules via CPAN, please see:
+https://www.cpan.org/modules/INSTALL.html
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-Which-1.22/MANIFEST new/File-Which-1.23/MANIFEST
--- old/File-Which-1.22/MANIFEST 2017-09-08 20:09:02.000000000 +0200
+++ new/File-Which-1.23/MANIFEST 2018-12-31 20:28:19.000000000 +0100
@@ -1,4 +1,4 @@
-# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.010.
+# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.012.
Changes
INSTALL
LICENSE
@@ -21,10 +21,8 @@
dist.ini
lib/File/Which.pm
t/00_diag.t
-t/01_compile.t
-t/02_all.t
-t/03_simple.t
-t/04_pwhich.t
+t/01_use.t
+t/file_which.t
xt/author/eol.t
xt/author/no_tabs.t
xt/author/pod.t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-Which-1.22/META.json new/File-Which-1.23/META.json
--- old/File-Which-1.22/META.json 2017-09-08 20:09:02.000000000 +0200
+++ new/File-Which-1.23/META.json 2018-12-31 20:28:19.000000000 +0100
@@ -6,7 +6,7 @@
"Graham Ollis "
],
"dynamic_config" : 0,
- "generated_by" : "Dist::Zilla version 6.010, CPAN::Meta::Converter version 2.150010",
+ "generated_by" : "Dist::Zilla version 6.012, CPAN::Meta::Converter version 2.150010",
"license" : [
"perl_5"
],
@@ -61,7 +61,9 @@
"web" : "https://github.com/plicease/File-Which"
}
},
- "version" : "1.22",
- "x_serialization_backend" : "Cpanel::JSON::XS version 3.0233"
+ "version" : "1.23",
+ "x_generated_by_perl" : "v5.29.6",
+ "x_serialization_backend" : "Cpanel::JSON::XS version 4.08",
+ "x_use_unsafe_inc" : 0
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-Which-1.22/META.yml new/File-Which-1.23/META.yml
--- old/File-Which-1.22/META.yml 2017-09-08 20:09:02.000000000 +0200
+++ new/File-Which-1.23/META.yml 2018-12-31 20:28:19.000000000 +0100
@@ -11,7 +11,7 @@
ExtUtils::MakeMaker: '0'
perl: '5.006'
dynamic_config: 0
-generated_by: 'Dist::Zilla version 6.010, CPAN::Meta::Converter version 2.150010'
+generated_by: 'Dist::Zilla version 6.012, CPAN::Meta::Converter version 2.150010'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -23,5 +23,7 @@
bugtracker: https://github.com/plicease/File-Which/issues
homepage: https://metacpan.org/pod/File::Which
repository: git://github.com/plicease/File-Which.git
-version: '1.22'
-x_serialization_backend: 'YAML::Tiny version 1.70'
+version: '1.23'
+x_generated_by_perl: v5.29.6
+x_serialization_backend: 'YAML::Tiny version 1.73'
+x_use_unsafe_inc: 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-Which-1.22/Makefile.PL new/File-Which-1.23/Makefile.PL
--- old/File-Which-1.22/Makefile.PL 2017-09-08 20:09:02.000000000 +0200
+++ new/File-Which-1.23/Makefile.PL 2018-12-31 20:28:19.000000000 +0100
@@ -5,7 +5,7 @@
exit;
}
}
-# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.010.
+# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.012.
use strict;
use warnings;
@@ -27,7 +27,7 @@
"TEST_REQUIRES" => {
"Test::More" => "0.47"
},
- "VERSION" => "1.22",
+ "VERSION" => "1.23",
"test" => {
"TESTS" => "t/*.t"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-Which-1.22/README new/File-Which-1.23/README
--- old/File-Which-1.22/README 2017-09-08 20:09:02.000000000 +0200
+++ new/File-Which-1.23/README 2018-12-31 20:28:19.000000000 +0100
@@ -4,7 +4,7 @@
VERSION
- version 1.22
+ version 1.23
SYNOPSIS
@@ -73,7 +73,7 @@
environment variable will NOT be discovered without the fully qualified
name, however.
- Windows 95, 98, ME, MS-DOS, OS/2
+ Windows ME, 98, 95, MS-DOS, OS/2
This set of operating systems don't have the PATHEXT variable, and
usually you will find executable files there with the extensions .exe,
@@ -119,8 +119,36 @@
Not exported by default.
- Same as "which" in array context. Same as the where utility, will
- return an array containing all the path names matching $short_exe_name.
+ Same as "which" in array context. Similar to the where csh built-in
+ command or which -a command for platforms that support the -a option.
+ Will return an array containing all the path names matching
+ $short_exe_name.
+
+GLOBALS
+
+ $IMPLICIT_CURRENT_DIR
+
+ True if the current directory is included in the search implicitly on
+ whatever platform you are using. Normally the default is reasonable,
+ but on Windows the current directory is included implicitly for older
+ shells like cmd.exe and command.com, but not for newer shells like
+ PowerShell. If you overrule this default, you should ALWAYS localize
+ the variable to the tightest scope possible, since setting this
+ variable from a module can affect other modules. Thus on Windows you
+ can get the correct result if the user is running either cmd.exe or
+ PowerShell on Windows you can do this:
+
+ use File::Which qw( which );
+ use Shell::Guess;
+
+ my $path = do {
+ my $is_power = Shell::Guess->running_shell->is_power;
+ local $File::Which::IMPLICIT_CURRENT_DIR = !$is_power;
+ which 'foo';
+ };
+
+ For a variety of reasons it is difficult to accurately compute the
+ shell that a user is using, but Shell::Guess makes a reasonable effort.
CAVEATS
@@ -151,10 +179,25 @@
IPC::Cmd
- Comes with a can_run function with slightly different semantics that
- the traditional UNIX where. It will find executables in the current
- directory, even though the current directory is not searched for by
- default on Unix.
+ This module provides (among other things) a can_run function, which
+ is similar to which. It is a much heavier module since it does a lot
+ more, and if you use can_run it pulls in ExtUtils::MakeMaker. This
+ combination may be overkill for applications which do not need
+ IPC::Cmd's complicated interface for running programs, or do not need
+ the memory overhead required for installing Perl modules.
+
+ At least some older versions will find executables in the current
+ directory, even if the current directory is not in the search path
+ (which is the default on modern Unix).
+
+ can_run converts directory path name to the 8.3 version on Windows
+ using Win32::GetShortPathName in some cases. This is frequently
+ useful for tools that just need to run something using system in
+ scalar mode, but may be inconvenient for tools like App::pwhich where
+ user readability is a premium. Relying on Win32::GetShortPathName to
+ produce filenames without spaces is problematic, as 8.3 filenames can
+ be turned off with tweaks to the registry (see
+ https://technet.microsoft.com/en-us/library/cc959352.aspx).
Devel::CheckBin
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-Which-1.22/author.yml new/File-Which-1.23/author.yml
--- old/File-Which-1.22/author.yml 2017-09-08 20:09:02.000000000 +0200
+++ new/File-Which-1.23/author.yml 2018-12-31 20:28:19.000000000 +0100
@@ -13,6 +13,7 @@
- Stas
- Win32
- XP
+ - PowerShell
pod_coverage:
skip: 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-Which-1.22/dist.ini new/File-Which-1.23/dist.ini
--- old/File-Which-1.22/dist.ini 2017-09-08 20:09:02.000000000 +0200
+++ new/File-Which-1.23/dist.ini 2018-12-31 20:28:19.000000000 +0100
@@ -5,7 +5,7 @@
license = Perl_5
copyright_holder = Per Einar Ellefsen
copyright_year = 2002
-version = 1.22
+version = 1.23
[@Author::Plicease]
:version = 2.00
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-Which-1.22/lib/File/Which.pm new/File-Which-1.23/lib/File/Which.pm
--- old/File-Which-1.22/lib/File/Which.pm 2017-09-08 20:09:02.000000000 +0200
+++ new/File-Which-1.23/lib/File/Which.pm 2018-12-31 20:28:19.000000000 +0100
@@ -6,7 +6,7 @@
use File::Spec ();
# ABSTRACT: Perl implementation of the which utility as an API
-our $VERSION = '1.22'; # VERSION
+our $VERSION = '1.23'; # VERSION
our @ISA = 'Exporter';
@@ -15,15 +15,18 @@
use constant IS_VMS => ($^O eq 'VMS');
use constant IS_MAC => ($^O eq 'MacOS');
-use constant IS_DOS => ($^O eq 'MSWin32' or $^O eq 'dos' or $^O eq 'os2');
+use constant IS_WIN => ($^O eq 'MSWin32' or $^O eq 'dos' or $^O eq 'os2');
+use constant IS_DOS => IS_WIN();
use constant IS_CYG => ($^O eq 'cygwin' || $^O eq 'msys');
+our $IMPLICIT_CURRENT_DIR = IS_WIN || IS_VMS || IS_MAC;
+
# For Win32 systems, stores the extensions used for
# executable files
# For others, the empty string is used
# because 'perl' . '' eq 'perl' => easier
my @PATHEXT = ('');
-if ( IS_DOS ) {
+if ( IS_WIN ) {
# WinNT. PATHEXT might be set on Cygwin, but not used.
if ( $ENV{PATHEXT} ) {
push @PATHEXT, split ';', $ENV{PATHEXT};
@@ -77,10 +80,21 @@
}
return $exec
- if !IS_VMS and !IS_MAC and !IS_DOS and $exec =~ /\// and -f $exec and -x $exec;
+ if !IS_VMS and !IS_MAC and !IS_WIN and $exec =~ /\// and -f $exec and -x $exec;
- my @path = File::Spec->path;
- if ( IS_DOS or IS_VMS or IS_MAC ) {
+ my @path;
+ if($^O eq 'MSWin32') {
+ # File::Spec (at least recent versions)
+ # add the implicit . for you on MSWin32,
+ # but we may or may not want to include
+ # that.
+ @path = split(';', $ENV{PATH});
+ s/"//g for @path;
+ @path = grep length, @path;
+ } else {
+ @path = File::Spec->path;
+ }
+ if ( $IMPLICIT_CURRENT_DIR ) {
unshift @path, File::Spec->curdir;
}
@@ -99,7 +113,7 @@
IS_MAC
||
(
- ( IS_DOS or IS_CYG )
+ ( IS_WIN or IS_CYG )
and
grep {
$file =~ /$_\z/i
@@ -146,7 +160,7 @@
=head1 VERSION
-version 1.22
+version 1.23
=head1 SYNOPSIS
@@ -171,7 +185,7 @@
The focus of this module is correctness and portability. As a consequence
platforms where the current directory is implicitly part of the search path
such as Microsoft Windows will find executables in the current directory,
-whereas on platforms such as UNIX where this is not the case executables
+whereas on platforms such as UNIX where this is not the case executables
in the current directory will only be found if the current directory is
explicitly added to the path.
@@ -214,7 +228,7 @@
specified using the C<PATHEXT> environment variable will NOT be discovered
without the fully qualified name, however.
-=head3 Windows 95, 98, ME, MS-DOS, OS/2
+=head3 Windows ME, 98, 95, MS-DOS, OS/2
This set of operating systems don't have the C<PATHEXT> variable, and usually
you will find executable files there with the extensions C<.exe>, C<.bat> and
@@ -261,15 +275,43 @@
Not exported by default.
-Same as L</which> in array context. Same as the
-C<where> utility, will return an array containing all the path names
+Same as L</which> in array context. Similar to the C<where> csh
+built-in command or C command for platforms that support the
+C<-a> option. Will return an array containing all the path names
matching C<$short_exe_name>.
+=head1 GLOBALS
+
+=head2 $IMPLICIT_CURRENT_DIR
+
+True if the current directory is included in the search implicitly on
+whatever platform you are using. Normally the default is reasonable,
+but on Windows the current directory is included implicitly for older
+shells like C and C, but not for newer shells
+like PowerShell. If you overrule this default, you should ALWAYS
+localize the variable to the tightest scope possible, since setting
+this variable from a module can affect other modules. Thus on Windows
+you can get the correct result if the user is running either C
+or PowerShell on Windows you can do this:
+
+ use File::Which qw( which );
+ use Shell::Guess;
+
+ my $path = do {
+ my $is_power = Shell::Guess->running_shell->is_power;
+ local $File::Which::IMPLICIT_CURRENT_DIR = !$is_power;
+ which 'foo';
+ };
+
+For a variety of reasons it is difficult to accurately compute the
+shell that a user is using, but LShell::Guess makes a reasonable
+effort.
+
=head1 CAVEATS
This module has no non-core requirements for Perl 5.6.2 and better.
-This module is fully supported back to Perl 5.8.1. It may work on 5.8.0.
+This module is fully supported back to Perl 5.8.1. It may work on 5.8.0.
It should work on Perl 5.6.x and I may even test on 5.6.2. I will accept
patches to maintain compatibility for such older Perls, but you may
need to fix it on 5.6.x / 5.8.0 and send me a patch.
@@ -296,10 +338,24 @@
=item LIPC::Cmd
-Comes with a C function with slightly different semantics that
-the traditional UNIX where. It will find executables in the current
-directory, even though the current directory is not searched for by
-default on Unix.
+This module provides (among other things) a C function, which is
+similar to C<which>. It is a much heavier module since it does a lot more,
+and if you use C it pulls in LExtUtils::MakeMaker. This combination
+may be overkill for applications which do not need LIPC::Cmd's complicated
+interface for running programs, or do not need the memory overhead required
+for installing Perl modules.
+
+At least some older versions will find executables in the current directory,
+even if the current directory is not in the search path (which is the default
+on modern Unix).
+
+C converts directory path name to the 8.3 version on Windows using
+CWin32::GetShortPathName in some cases. This is frequently useful for tools
+that just need to run something using C<system> in scalar mode, but may be
+inconvenient for tools like LApp::pwhich where user readability is a premium.
+Relying on CWin32::GetShortPathName to produce filenames without spaces
+is problematic, as 8.3 filenames can be turned off with tweaks to the
+registry (see Lhttps://technet.microsoft.com/en-us/library/cc959352.aspx).
=item LDevel::CheckBin
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-Which-1.22/t/01_compile.t new/File-Which-1.23/t/01_compile.t
--- old/File-Which-1.22/t/01_compile.t 2017-09-08 20:09:02.000000000 +0200
+++ new/File-Which-1.23/t/01_compile.t 1970-01-01 01:00:00.000000000 +0100
@@ -1,5 +0,0 @@
-use strict;
-use warnings;
-use Test::More tests => 1;
-
-use_ok( 'File::Which' );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-Which-1.22/t/01_use.t new/File-Which-1.23/t/01_use.t
--- old/File-Which-1.22/t/01_use.t 1970-01-01 01:00:00.000000000 +0100
+++ new/File-Which-1.23/t/01_use.t 2018-12-31 20:28:19.000000000 +0100
@@ -0,0 +1,5 @@
+use strict;
+use warnings;
+use Test::More tests => 1;
+
+use_ok( 'File::Which' );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-Which-1.22/t/02_all.t new/File-Which-1.23/t/02_all.t
--- old/File-Which-1.22/t/02_all.t 2017-09-08 20:09:02.000000000 +0200
+++ new/File-Which-1.23/t/02_all.t 1970-01-01 01:00:00.000000000 +0100
@@ -1,50 +0,0 @@
-use strict;
-use warnings;
-use Env qw( @PATH );
-use Test::More tests => 6;
-use File::Spec ();
-use File::Which qw(which where);
-
-# Where is the test application
-my $test_bin = File::Spec->catdir( 'corpus', $^O =~ /^(MSWin32|dos|os2)$/ ? 'test-bin-win' : 'test-bin-unix' );
-ok( -d $test_bin, 'Found test-bin' );
-
-# Set up for running the test application
-@PATH = ($test_bin);
-push @PATH, File::Spec->catdir( 'corpus', 'test-bin-win' ) if $^O =~ /^(cygwin|msys)$/;
-unless (
- File::Which::IS_VMS
- or
- File::Which::IS_MAC
- or
- File::Which::IS_DOS
-) {
- my $all = File::Spec->catfile( $test_bin, 'all' );
- chmod 0755, $all;
-}
-
-my @result = which('all');
-like( $result[0], qr/all/i, 'Found all' );
-ok( scalar(@result), 'Found at least one result' );
-
-# Should have as many elements.
-is(
- scalar(@result),
- scalar(where('all')),
- 'Scalar which result matches where result',
-);
-
-my $zero = which '0';
-
-ok(
- $zero,
- "zero = $zero"
-);
-
-my $empty_string = which '';
-
-is(
- $empty_string,
- undef,
- "empty string"
-);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-Which-1.22/t/03_simple.t new/File-Which-1.23/t/03_simple.t
--- old/File-Which-1.22/t/03_simple.t 2017-09-08 20:09:02.000000000 +0200
+++ new/File-Which-1.23/t/03_simple.t 1970-01-01 01:00:00.000000000 +0100
@@ -1,87 +0,0 @@
-use strict;
-use warnings;
-use Test::More tests => 10;
-use File::Spec ();
-use File::Which qw{which where};
-use Env qw( @PATH );
-
-use constant IS_VMS => ($^O eq 'VMS');
-use constant IS_MAC => ($^O eq 'MacOS');
-use constant IS_DOS => ($^O eq 'MSWin32' or $^O eq 'dos' or $^O eq 'os2');
-use constant IS_CYGWIN => ($^O eq 'cygwin');
-
-# Check that it returns undef if no file is passed
-is(
- scalar(which('')), undef,
- 'Null-length false result',
-);
-is(
- scalar(which('non_existent_very_unlinkely_thingy_executable')), undef,
- 'Positive length false result',
-);
-
-# Where is the test application
-my $test_bin = File::Spec->catdir( 'corpus', IS_DOS ? 'test-bin-win' : 'test-bin-unix' );
-ok( -d $test_bin, 'Found test-bin' );
-
-# Set up for running the test application
-@PATH = $test_bin;
-push @PATH, File::Spec->catdir( 'corpus', 'test-bin-win' ) if IS_CYGWIN;
-unless (
- File::Which::IS_VMS
- or
- File::Which::IS_MAC
- or
- File::Which::IS_DOS
-) {
- my $test3 = File::Spec->catfile( $test_bin, 'test3' );
- chmod 0755, $test3;
-}
-
-SKIP: {
- skip("Not on DOS-like filesystem", 3) unless IS_DOS;
- is( lc scalar which('test1'), 'corpus\test-bin-win\test1.exe', 'Looking for test1.exe' );
- is( lc scalar which('test2'), 'corpus\test-bin-win\test2.bat', 'Looking for test2.bat' );
- is( scalar which('test3'), undef, 'test3 returns undef' );
-}
-
-SKIP: {
- skip("Not on a UNIX filesystem", 1) if IS_DOS;
- skip("Not on a UNIX filesystem", 1) if IS_MAC;
- skip("Not on a UNIX filesystem", 1) if IS_VMS;
- is(
- scalar(which('test3')),
- File::Spec->catfile( $test_bin, 'test3'),
- 'Check test3 for Unix',
- );
-}
-
-SKIP: {
- skip("Not on a cygwin filesystem", 2) unless IS_CYGWIN;
-
- # Cygwin: should make test1.exe transparent
- is(
- scalar(which('test1')),
- File::Spec->catfile( 'corpus', 'test-bin-win', 'test1' ),
- 'Looking for test1 on Cygwin: transparent to test1.exe',
- );
- is(
- scalar(which('test4')),
- undef,
- 'Make sure that which() doesn\'t return a directory',
- );
-}
-
-# Make sure that .\ stuff works on DOSish, VMS, MacOS (. is in PATH implicitly).
-SKIP: {
- unless ( IS_DOS or IS_VMS ) {
- skip("Not on a DOS or VMS filesystem", 1);
- }
-
- chdir( $test_bin );
- is(
- lc scalar which('test1'),
- File::Spec->catfile(File::Spec->curdir(), 'test1.exe'),
- 'Looking for test1.exe in curdir',
- );
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-Which-1.22/t/04_pwhich.t new/File-Which-1.23/t/04_pwhich.t
--- old/File-Which-1.22/t/04_pwhich.t 2017-09-08 20:09:02.000000000 +0200
+++ new/File-Which-1.23/t/04_pwhich.t 1970-01-01 01:00:00.000000000 +0100
@@ -1,13 +0,0 @@
-use strict;
-use warnings;
-
-use Test::More tests => 3;
-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" );
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-Which-1.22/t/file_which.t new/File-Which-1.23/t/file_which.t
--- old/File-Which-1.22/t/file_which.t 1970-01-01 01:00:00.000000000 +0100
+++ new/File-Which-1.23/t/file_which.t 2018-12-31 20:28:19.000000000 +0100
@@ -0,0 +1,152 @@
+use strict;
+use warnings;
+use Env qw( @PATH );
+use Test::More tests => 19;
+use File::Spec ();
+use File::Which qw(which where);
+
+{
+
+ local $ENV{PATH} = $ENV{PATH};
+
+ # Check that it returns undef if no file is passed
+ is(
+ scalar(which('')), undef,
+ 'Null-length false result',
+ );
+ is(
+ scalar(which('non_existent_very_unlinkely_thingy_executable')), undef,
+ 'Positive length false result',
+ );
+
+ # Where is the test application
+ my $test_bin = File::Spec->catdir( 'corpus', File::Which::IS_WIN ? 'test-bin-win' : 'test-bin-unix' );
+ ok( -d $test_bin, 'Found test-bin' );
+
+ # Set up for running the test application
+ @PATH = $test_bin;
+ push @PATH, File::Spec->catdir( 'corpus', 'test-bin-win' ) if File::Which::IS_CYG;
+ unless (
+ File::Which::IS_VMS
+ or
+ File::Which::IS_MAC
+ or
+ File::Which::IS_WIN
+ ) {
+ my $test3 = File::Spec->catfile( $test_bin, 'test3' );
+ chmod 0755, $test3;
+ }
+
+ SKIP: {
+ skip("Not on DOS-like filesystem", 3) unless File::Which::IS_WIN;
+ is( lc scalar which('test1'), 'corpus\test-bin-win\test1.exe', 'Looking for test1.exe' );
+ is( lc scalar which('test2'), 'corpus\test-bin-win\test2.bat', 'Looking for test2.bat' );
+ is( scalar which('test3'), undef, 'test3 returns undef' );
+ }
+
+ SKIP: {
+ skip("Not on a UNIX filesystem", 1) if File::Which::IS_WIN;
+ skip("Not on a UNIX filesystem", 1) if File::Which::IS_MAC;
+ skip("Not on a UNIX filesystem", 1) if File::Which::IS_VMS;
+ is(
+ scalar(which('test3')),
+ File::Spec->catfile( $test_bin, 'test3'),
+ 'Check test3 for Unix',
+ );
+ }
+
+ SKIP: {
+ skip("Not on a cygwin filesystem", 2) unless File::Which::IS_CYG;
+
+ # Cygwin: should make test1.exe transparent
+ is(
+ scalar(which('test1')),
+ File::Spec->catfile( 'corpus', 'test-bin-win', 'test1' ),
+ 'Looking for test1 on Cygwin: transparent to test1.exe',
+ );
+ is(
+ scalar(which('test4')),
+ undef,
+ 'Make sure that which() doesn\'t return a directory',
+ );
+ }
+
+ # Make sure that .\ stuff works on DOSish, VMS, MacOS (. is in PATH implicitly).
+ SKIP: {
+ unless ( File::Which::IS_WIN or File::Which::IS_VMS ) {
+ skip("Not on a DOS or VMS filesystem", 1);
+ }
+
+ chdir( $test_bin );
+ is(
+ lc scalar which('test1'),
+ File::Spec->catfile(File::Spec->curdir(), 'test1.exe'),
+ 'Looking for test1.exe in curdir',
+ );
+ chdir File::Spec->updir;
+ chdir File::Spec->updir;
+ }
+
+}
+
+{
+
+ local $ENV{PATH} = $ENV{PATH};
+
+ # Where is the test application
+ my $test_bin = File::Spec->catdir( 'corpus', $^O =~ /^(MSWin32|dos|os2)$/ ? 'test-bin-win' : 'test-bin-unix' );
+ ok( -d $test_bin, 'Found test-bin' );
+
+ # Set up for running the test application
+ @PATH = ($test_bin);
+ push @PATH, File::Spec->catdir( 'corpus', 'test-bin-win' ) if $^O =~ /^(cygwin|msys)$/;
+ unless (
+ File::Which::IS_VMS
+ or
+ File::Which::IS_MAC
+ or
+ File::Which::IS_WIN
+ ) {
+ my $all = File::Spec->catfile( $test_bin, 'all' );
+ chmod 0755, $all;
+ }
+
+ my @result = which('all');
+ like( $result[0], qr/all/i, 'Found all' );
+ ok( scalar(@result), 'Found at least one result' );
+
+ # Should have as many elements.
+ is(
+ scalar(@result),
+ scalar(where('all')),
+ 'Scalar which result matches where result',
+ );
+
+ my $zero = which '0';
+
+ ok(
+ $zero,
+ "zero = $zero"
+ );
+
+ my $empty_string = which '';
+
+ is(
+ $empty_string,
+ undef,
+ "empty string"
+ );
+
+}
+
+{
+
+ # 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" );
+
+}
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-Which-1.22/xt/author/version.t new/File-Which-1.23/xt/author/version.t
--- old/File-Which-1.22/xt/author/version.t 2017-09-08 20:09:02.000000000 +0200
+++ new/File-Which-1.23/xt/author/version.t 2018-12-31 20:28:19.000000000 +0100
@@ -13,8 +13,6 @@
1
};
- plan skip_all => "test requires Path::Class"
- unless eval q{ use Path::Class qw( file dir ); 1 };
plan skip_all => 'test requires YAML'
unless eval q{ use YAML; 1; };
}
@@ -23,10 +21,6 @@
use FindBin;
use File::Spec;
-plan skip_all => "test not built yet (run dzil test)"
- unless -e dir( $FindBin::Bin)->parent->parent->file('Makefile.PL')
- || -e dir( $FindBin::Bin)->parent->parent->file('Build.PL');
-
my $config_filename = File::Spec->catfile(
$FindBin::Bin, File::Spec->updir, File::Spec->updir, 'author.yml'
);