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 foreach (qw (podchecker podselect pod2usage)) {
29 $dist_dir_exe{lc "$_.PL"} = "../cpan/Pod-Parser/$_";
31 foreach (qw (pod2man pod2text)) {
32 $dist_dir_exe{lc "$_.PL"} = "../cpan/podlators/$_";
34 $dist_dir_exe{'pod2html.pl'} = '../ext/Pod-Html';
40 my $name = $File::Find::name;
41 return if $name =~ /blib/;
42 return unless $name =~ m{/(?:bin|scripts?)/\S+\z} && $name !~ m{/t/};
44 push @programs, $name;
46 qw( ../cpan ../dist ../ext ),
49 my $ext = $^O eq 'VMS' ? '.com' : '';
51 for my $f ( @programs ) {
52 $f =~ s/\.\z// if $^O eq 'VMS';
53 next if $f =~ $not_installed;
54 my $bn = basename($f);
55 if(qr/\A(?i:$bn)\z/ ~~ %dist_dir_exe) {
56 ok( -f "$dist_dir_exe{lc $bn}$ext", "$f$ext");
58 ok( -f catfile('..', 'utils', "$bn$ext"), "$f$ext" );