From cde5101a7be11e27127dc4c214d749bb2cc993e6 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Tue, 5 Oct 2010 07:32:21 +0100 Subject: Move pod2usage.PL, podchecker.PL, podselect.PL into cpan/Pod-Parser/scripts Let ExtUtils::MakeMaker deal with running these extraction scripts, rather than repeating the logic in (at least) 5 places. --- t/porting/dual-life.t | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 't/porting') diff --git a/t/porting/dual-life.t b/t/porting/dual-life.t index 9fb780278d..3ec88af5a6 100644 --- a/t/porting/dual-life.t +++ b/t/porting/dual-life.t @@ -16,13 +16,19 @@ use File::Spec::Functions; # Exceptions are found in dual-life bin dirs but aren't # installed by default -my @exceptions = qw( +my @not_installed = qw( ../cpan/Encode/bin/ucm2table ../cpan/Encode/bin/ucmlint ../cpan/Encode/bin/ucmsort ../cpan/Encode/bin/unidump ); +my %dist_dir_exe; + +foreach (qw (podchecker podselect pod2usage)) { + $dist_dir_exe{lc "$_.PL"} = "../cpan/Pod-Parser/$_"; +}; + my @programs; find( @@ -36,11 +42,16 @@ find( qw( ../cpan ../dist ../ext ), ); +my $ext = $^O eq 'VMS' ? '.com' : ''; + for my $f ( @programs ) { $f =~ s/\.\z// if $^O eq 'VMS'; - next if qr/(?i:$f)/ ~~ @exceptions; + next if qr/(?i:$f)/ ~~ @not_installed; $f = basename($f); - $f .= '.com' if $^O eq 'VMS'; - ok( -f catfile('..', 'utils', $f), "$f" ); + if(qr/\A(?i:$f)\z/ ~~ %dist_dir_exe) { + ok( -f "$dist_dir_exe{lc $f}$ext", "$f$ext"); + } else { + ok( -f catfile('..', 'utils', "$f$ext"), "$f$ext" ); + } } -- cgit v1.2.1