5 # This tests properties of dual-life modules:
7 # * Are all dual-life programs being generated in utils/?
13 if ( $Config{usecrosscompile} ) {
14 skip_all( "Not all files are available during cross-compilation" );
21 use File::Spec::Functions;
23 # Exceptions that are found in dual-life bin dirs but aren't
24 # installed by default; some occur only during testing:
25 my $not_installed = qr{^(?:
26 \.\./cpan/Encode/bin/u(?:cm(?:2table|lint|sort)|nidump)
28 \.\./cpan/Module-(?:Metadata|Build)
29 /MB-[\w\d]+/Simple/(?:test_install/)?bin/.*
34 $dist_dir_exe{lc "podselect.PL"} = "../cpan/Pod-Parser/podselect";
35 $dist_dir_exe{lc "podchecker.PL"} = "../cpan/Pod-Checker/podchecker";
36 $dist_dir_exe{lc "pod2usage.PL"} = "../cpan/Pod-Usage/pod2usage";
38 foreach (qw (pod2man pod2text)) {
39 $dist_dir_exe{lc "$_.PL"} = "../cpan/podlators/$_";
41 $dist_dir_exe{'pod2html.pl'} = '../ext/Pod-Html';
46 { no_chdir => 1, wanted => sub {
47 my $name = $File::Find::name;
48 return if $name =~ /blib/;
49 return unless $name =~ m{/(?:bin|scripts?)/\S+\z} && $name !~ m{/t/};
51 push @programs, $name;
53 qw( ../cpan ../dist ../ext ),
56 my $ext = $^O eq 'VMS' ? '.com' : '';
58 for my $f ( @programs ) {
59 $f =~ s/\.\z// if $^O eq 'VMS';
60 next if $f =~ $not_installed;
61 my $bn = basename($f);
62 if(grep { /\A(?i:$bn)\z/ } keys %dist_dir_exe) {
63 ok( -f "$dist_dir_exe{lc $bn}$ext", "$f$ext");
65 ok( -f catfile('..', 'utils', "$bn$ext"), "$f$ext" );