Trim the import list from File::Spec::Functions and don't use File::Find.
authorNicholas Clark <nick@ccl4.org>
Thu, 19 May 2011 15:55:06 +0000 (16:55 +0100)
committerNicholas Clark <nick@ccl4.org>
Mon, 23 May 2011 14:07:27 +0000 (15:07 +0100)
Most of the vestigial entries were caused by the refactoring to use git in
42e700c91cf83f56. Use File::Spec::Functions::devnull() in place of hard coded
values based on $^O.

Porting/cmpVERSION.pl

index 81384f271dfce9908ff4c9e8edec44afd5faf188..782ab268e0eafb57d2bbe9f5f2ff9d30c2edf72e 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/perl -w
 
-#
 # cmpVERSION - compare the current Perl source tree and a given tag
 # for modules that have identical version numbers but different contents.
 #
@@ -16,8 +15,7 @@ use strict;
 
 use ExtUtils::MakeMaker;
 use File::Compare;
-use File::Find;
-use File::Spec::Functions qw(rel2abs abs2rel catfile catdir curdir);
+use File::Spec::Functions qw(catfile catdir devnull);
 use Getopt::Std;
 
 sub usage {
@@ -36,7 +34,7 @@ die "$0: '$source_dir' does not look like a Perl directory\n"
 die "$0: '$source_dir' is a Perl directory but does not look like Git working directory\n"
     unless -d catdir($source_dir, ".git");
 
-my $null = $^O eq 'MSWin32' ? 'nul' : '/dev/null';
+my $null = devnull();
 
 my $tag_exists = `git --no-pager tag -l $tag_to_compare 2>$null`;
 chomp $tag_exists;