[dh-make-perl] 01/03: configure_cpan: save/restore the CWD

Damyan Ivanov dmn at alioth.debian.org
Thu Aug 8 13:58:50 UTC 2013


This is an automated email from the git hooks/post-receive script.

dmn pushed a commit to branch master
in repository dh-make-perl.

commit 9b42517ebbcb380d3b550efc7b303bc37c7d6973
Author: Damyan Ivanov <dmn at debian.org>
Date:   Thu Aug 8 15:55:48 2013 +0200

    configure_cpan: save/restore the CWD
    
    it appears CPAN configuration may change this
---
 lib/DhMakePerl/Command/Packaging.pm |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/DhMakePerl/Command/Packaging.pm b/lib/DhMakePerl/Command/Packaging.pm
index df803ac..ca33a2e 100644
--- a/lib/DhMakePerl/Command/Packaging.pm
+++ b/lib/DhMakePerl/Command/Packaging.pm
@@ -1341,6 +1341,8 @@ sub configure_cpan {
 
     return if $CPAN::Config_loaded;
 
+    my $save_cwd = getcwd();
+
     CPAN::HandleConfig->load( be_silent => not $self->cfg->verbose )
         if $self->cfg->network;
 
@@ -1353,6 +1355,8 @@ sub configure_cpan {
 
     $CPAN::Config->{build_requires_install_policy} = 'no';
     $CPAN::Config->{prerequisites_policy} = 'ignore';
+
+    chdir $save_cwd;
 }
 
 =item discover_dependencies

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/dh-make-perl.git



More information about the Pkg-perl-cvs-commits mailing list