5 # This tests properties of dual-life modules:
7 # * Are all dual-life programs being generated in utils/?
16 use File::Spec::Functions;
18 # Exceptions that are found in dual-life bin dirs but aren't
19 # installed by default; some occur only during testing:
20 my $not_installed = qr{^(?:
21 \.\./cpan/Encode/bin/u(?:cm(?:2table|lint|sort)|nidump)
23 \.\./cpan/Module-Build/MB-[\w\d]+/Simple/(?:test_install/)?bin/.*
28 $dist_dir_exe{lc "podselect.PL"} = "../cpan/Pod-Parser/podselect";
29 $dist_dir_exe{lc "podchecker.PL"} = "../cpan/Pod-Checker/podchecker";
30 $dist_dir_exe{lc "pod2usage.PL"} = "../cpan/Pod-Usage/pod2usage";
32 foreach (qw (pod2man pod2text)) {
33 $dist_dir_exe{lc "$_.PL"} = "../cpan/podlators/$_";
35 $dist_dir_exe{'pod2html.pl'} = '../ext/Pod-Html';
40 { no_chidr => 1, wanted => sub {
41 my $name = $File::Find::name;
42 return if $name =~ /blib/;
43 return unless $name =~ m{/(?:bin|scripts?)/\S+\z} && $name !~ m{/t/};
45 push @programs, $name;
47 qw( ../cpan ../dist ../ext ),
50 my $ext = $^O eq 'VMS' ? '.com' : '';
52 for my $f ( @programs ) {
53 $f =~ s/\.\z// if $^O eq 'VMS';
54 next if $f =~ $not_installed;
55 my $bn = basename($f);
56 if(grep { /\A(?i:$bn)\z/ } keys %dist_dir_exe) {
57 ok( -f "$dist_dir_exe{lc $bn}$ext", "$f$ext");
59 ok( -f catfile('..', 'utils', "$bn$ext"), "$f$ext" );