{
my $Top = File::Spec->catdir($FindBin::Bin, File::Spec->updir);
chdir $Top or die "Can't chdir to $Top: $!";
-
- sub abs_from_top {
- my $path = shift;
- return File::Spec->catdir($Top, split /\//, $path) if $path =~ s!/\z!!;
- return File::Spec->catfile($Top, split /\//, $path);
- }
}
# make it clearer when we haven't run to completion, as we can be quite
}
-$masterpodfile = abs_from_top('pod.lst');
+$masterpodfile = 'pod.lst';
# Generate any/all of these files
# --verbose gives slightly more output
# TODO: add roffitall
);
-foreach (values %Targets) {
- $_ = abs_from_top($_);
-}
-
# process command-line switches
{
{
my $source = 'perldelta.pod';
- my $filename = abs_from_top("pod/$source");
+ my $filename = "pod/$source";
open my $fh, '<', $filename or my_die "Can't open $filename: $!";
local $/;
my $contents = <$fh>;
$our_pods{"$_.pod"}++;
}
- opendir my $dh, abs_from_top('pod/');
+ opendir my $dh, 'pod';
while (defined ($_ = readdir $dh)) {
next unless /\.pod\z/;
push @disk_pods, $_;
# Things we copy from won't be in perl.pod
# Things we copy to won't be in MANIFEST
- my $filename = abs_from_top('MANIFEST');
+ my $filename = 'MANIFEST';
open my $mani, '<', $filename or my_die "opening $filename failed: $!";
while (<$mani>) {
chomp;
@cpanpods{@cpanpods} = map { s/.*\///r } @cpanpods;
%cpanpods_short = reverse %cpanpods;
- $filename = abs_from_top('pod/perl.pod');
+ $filename = 'pod/perl.pod';
open my $perlpod, '<', $filename or my_die "opening $filename failed: $!\n";
while (<$perlpod>) {
if (/^For ease of access, /../^\(If you're intending /) {
# Find all the modules
if ($Build{toc}) {
my @modpods;
- find \&getpods => abs_from_top('lib/');
+ find \&getpods => 'lib';
sub getpods {
if (/\.p(od|m)$/) {
# All the things in the master list that happen to be pod filenames
foreach (grep {defined $_ && @$_ == 3 && !$_->[0]{toc_omit}} @Master) {
- podset($_->[1], abs_from_top($_->[2]));
+ podset(@$_);
}