From: Vincent Pit Date: Sat, 6 Dec 2008 23:43:12 +0000 (+0100) Subject: Make the overlay and the distdir absolute. Cwd is required X-Git-Tag: v0.05~26 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=07bd0229f3fe4814b4355061f6cf2e97a3c76921;p=perl%2Fmodules%2FCPANPLUS-Dist-Gentoo.git Make the overlay and the distdir absolute. Cwd is required --- diff --git a/Makefile.PL b/Makefile.PL index 152179a..7101df2 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -28,6 +28,7 @@ WriteMakefile( PL_FILES => {}, PREREQ_PM => { 'CPANPLUS' => 0, + 'Cwd' => 0, 'File::Copy' => 0, 'File::Path' => 0, 'File::Spec::Functions' => 0, diff --git a/lib/CPANPLUS/Dist/Gentoo.pm b/lib/CPANPLUS/Dist/Gentoo.pm index ee6c612..fda4b05 100644 --- a/lib/CPANPLUS/Dist/Gentoo.pm +++ b/lib/CPANPLUS/Dist/Gentoo.pm @@ -3,6 +3,7 @@ package CPANPLUS::Dist::Gentoo; use strict; use warnings; +use Cwd qw/abs_path/; use File::Copy qw/copy/; use File::Path qw/mkpath/; use File::Spec::Functions qw/catdir catfile/; @@ -126,9 +127,13 @@ sub prepare { } $stat->footer($footer); - $stat->overlay(delete($opts{'overlay'}) || '/usr/local/portage'); + my $overlay = delete $opts{'overlay'}; + $overlay = (defined $overlay) ? abs_path $overlay : '/usr/local/portage'; + $stat->overlay($overlay); - $stat->distdir(delete($opts{'distdir'}) || '/usr/portage/distfiles'); + my $distdir = delete $opts{'distdir'}; + $distdir = (defined $distdir) ? abs_path $distdir : '/usr/portage/distfiles'; + $stat->distdir($distdir); if ($stat->do_manifest && !-w $stat->distdir) { error 'distdir isn\'t writable -- aborting'; @@ -358,7 +363,7 @@ Gentoo (L). L, L (core modules since 5.9.5). -L (since 5.001), L (5.002), L (5.00504). +L (since perl 5) L (5.001), L (5.002), L (5.00504). =head1 SEE ALSO