[dh-make-perl] 01/01: lib/DhMakePerl/Command/Packaging.pm: new get_user method (bug #856532)

Carnë Draug carandraug+dev at gmail.com
Thu Mar 16 19:03:43 UTC 2017


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

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

commit c8fb32794a028597cc15422223d84f5728f4c32f
Author: Carnë Draug <carandraug+dev at gmail.com>
Date:   Thu Mar 16 18:47:16 2017 +0000

    lib/DhMakePerl/Command/Packaging.pm: new get_user method (bug #856532)
    
    * lib/DhMakePerl/Command/Packaging.p: new get_user method which fixes
    regression caused by 23b15bd799
    * debian/changelog: close bug #856532
---
 debian/changelog                    | 6 +++++-
 lib/DhMakePerl/Command/Packaging.pm | 8 ++++++--
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index f74f951..74c4127 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,10 @@
 dh-make-perl (0.94) UNRELEASED; urgency=medium
 
-  * <dummy entry to bump version>
+  [ Carnë Draug ]
+  * Fix "Error: Can't locate object method "get_user"" Create new
+    DhMakePerl::Command::Packaging->get_user method which is used when
+    DEBEMAIL and EMAIL are unset.  Fixes regression from 0.93.
+    (Closes: #856532)
 
  -- gregor herrmann <gregoa at debian.org>  Thu, 26 Jan 2017 20:29:31 +0100
 
diff --git a/lib/DhMakePerl/Command/Packaging.pm b/lib/DhMakePerl/Command/Packaging.pm
index 690740a..0dcae6d 100644
--- a/lib/DhMakePerl/Command/Packaging.pm
+++ b/lib/DhMakePerl/Command/Packaging.pm
@@ -119,13 +119,17 @@ sub makefile_pl {
     return $self->main_file('Makefile.PL');
 }
 
+sub get_user {
+    return $ENV{LOGNAME} || $ENV{USER};
+}
+
 sub get_email {
     my $self = shift;
     my $email = $self->cfg->email;
 
     $email ||= ( $ENV{DEBEMAIL} || $ENV{EMAIL} );
     unless ($email) {
-	my $mailh;
+        my $mailh;
         chomp( $mailh = `cat /etc/mailname` );
         $email = $self->get_user . '@' . $mailh;
     }
@@ -138,7 +142,7 @@ sub get_name {
     my $self = shift;
 
     my $name;
-    my $user = $ENV{LOGNAME} || $ENV{USER};
+    my $user = $self->get_user;
     my $pwnam = getpwuid($<);
     die "Cannot determine current user\n" unless $pwnam;
     if ( defined $ENV{DEBFULLNAME} ) {

-- 
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