manifypods.t (Module-Build-0.4232) | : | manifypods.t (Module-Build-0.4234) | ||
---|---|---|---|---|
#!/usr/bin/perl -w | #!/usr/bin/perl -w | |||
use strict; | use strict; | |||
use lib 't/lib'; | use lib 't/lib'; | |||
use MBTest; | use MBTest; | |||
blib_load('Module::Build'); | blib_load('Module::Build'); | |||
blib_load('Module::Build::ConfigData'); | blib_load('Module::Build::ConfigData'); | |||
if ( Module::Build::ConfigData->feature('manpage_support') ) { | if ( Module::Build::ConfigData->feature('manpage_support') ) { | |||
plan tests => 21; | plan tests => 33; | |||
} else { | } else { | |||
plan skip_all => 'manpage_support feature is not enabled'; | plan skip_all => 'manpage_support feature is not enabled'; | |||
} | } | |||
######################### | ######################### | |||
use Cwd (); | use Cwd (); | |||
my $cwd = Cwd::cwd; | my $cwd = Cwd::cwd; | |||
my $tmp = MBTest->tmpdir; | my $tmp = MBTest->tmpdir; | |||
skipping to change at line 54 | skipping to change at line 54 | |||
=head1 NAME | =head1 NAME | |||
Simple::AllPod - Pure POD | Simple::AllPod - Pure POD | |||
=head1 AUTHOR | =head1 AUTHOR | |||
Simple Man <simple@example.com> | Simple Man <simple@example.com> | |||
=cut | =cut | |||
--- | --- | |||
for ([1 => ".pod"], [2 => ".pm"], [3 => ".pl"], [4 => ""]) { # array of _arrays_ | ||||
$dist->add_file( "docs/myapp$_->[0]$_->[1]", <<"---" ); | ||||
=head1 NAME | ||||
myapp$_->[0] - Pure POD | ||||
=head1 AUTHOR | ||||
Simple Man <simple\@example.com> | ||||
=cut | ||||
1; | ||||
--- | ||||
} | ||||
$dist->regen; | $dist->regen; | |||
$dist->chdir_in; | $dist->chdir_in; | |||
use File::Spec::Functions qw( catdir ); | use File::Spec::Functions qw( catdir ); | |||
my $destdir = catdir($cwd, 't', 'install_test' . $$); | my $destdir = catdir($cwd, 't', 'install_test' . $$); | |||
my $mb = Module::Build->new( | my $mb = Module::Build->new( | |||
module_name => $dist->name, | module_name => $dist->name, | |||
install_base => $destdir, | install_base => $destdir, | |||
bindoc_dirs => ['bin', 'docs'], | ||||
scripts => [ File::Spec->catfile( 'bin', 'nopod.pl' ), | scripts => [ File::Spec->catfile( 'bin', 'nopod.pl' ), | |||
File::Spec->catfile( 'bin', 'haspod.pl' ) ], | File::Spec->catfile( 'bin', 'haspod.pl' ) ], | |||
# Need default install paths to ensure manpages get generated | # Need default install paths to ensure manpages get generated | |||
installdirs => 'site', | installdirs => 'site', | |||
config => { | config => { | |||
installsiteman1dir => catdir($tmp, 'site', 'man', 'man1'), | installsiteman1dir => catdir($tmp, 'site', 'man', 'man1'), | |||
installsiteman3dir => catdir($tmp, 'site', 'man', 'man3'), | installsiteman3dir => catdir($tmp, 'site', 'man', 'man3'), | |||
} | } | |||
skipping to change at line 95 | skipping to change at line 111 | |||
ext1 => $mb->config('man1ext'), | ext1 => $mb->config('man1ext'), | |||
ext3 => $mb->config('man3ext'), | ext3 => $mb->config('man3ext'), | |||
); | ); | |||
my %distro = ( | my %distro = ( | |||
'bin/nopod.pl' => '', | 'bin/nopod.pl' => '', | |||
'bin/haspod.pl' => "haspod.pl.$man{ext1}", | 'bin/haspod.pl' => "haspod.pl.$man{ext1}", | |||
'lib/Simple.pm' => "Simple.$man{ext3}", | 'lib/Simple.pm' => "Simple.$man{ext3}", | |||
'lib/Simple/NoPod.pm' => '', | 'lib/Simple/NoPod.pm' => '', | |||
'lib/Simple/AllPod.pod' => "Simple$man{sep}AllPod.$man{ext3}", | 'lib/Simple/AllPod.pod' => "Simple$man{sep}AllPod.$man{ext3}", | |||
'docs/myapp1.pod' => "myapp1.pod.$man{ext1}", | ||||
'docs/myapp2.pm' => "myapp2.pm.$man{ext1}", | ||||
'docs/myapp3.pl' => "myapp3.pl.$man{ext1}", | ||||
'docs/myapp4' => "myapp4.$man{ext1}", | ||||
); | ); | |||
%distro = map {$mb->localize_file_path($_), $distro{$_}} keys %distro; | %distro = map {$mb->localize_file_path($_), $distro{$_}} keys %distro; | |||
my $lib_path = $mb->localize_dir_path('lib'); | my $lib_path = $mb->localize_dir_path('lib'); | |||
# Remove trailing directory delimiter on VMS for compares | # Remove trailing directory delimiter on VMS for compares | |||
$lib_path =~ s/\]// if $^O eq 'VMS'; | $lib_path =~ s/\]// if $^O eq 'VMS'; | |||
$mb->dispatch('build'); | $mb->dispatch('build'); | |||
End of changes. 4 change blocks. | ||||
1 lines changed or deleted | 21 lines changed or added |