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

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

commit a16ab2e63d8c15c153db2047f6d31b0c28af2ed2
Author: Christopher Hoskin <christopher.hos...@gmail.com>
Date:   Fri Dec 16 11:12:47 2016 +0000

    Require user intervention to resolve version ambiguity
---
 lib/DhMakePerl/Command/Packaging.pm | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/lib/DhMakePerl/Command/Packaging.pm 
b/lib/DhMakePerl/Command/Packaging.pm
index 2b07ac4..d759b66 100644
--- a/lib/DhMakePerl/Command/Packaging.pm
+++ b/lib/DhMakePerl/Command/Packaging.pm
@@ -356,8 +356,14 @@ sub extract_name_ver {
         $ver  = $self->version;
     }
 
-    $ver = $self->cfg->version
-        if $self->cfg->version;
+    if ($self->cfg->version) {
+        #Version specified on command line trumps other versions
+        $ver = $self->cfg->version
+    } elsif ( $self->mod_cpan_version ) {
+        if ($self->mod_cpan_version != $ver) {
+            die "Version ambiguity, cpan has ".$self->mod_cpan_version.", 
module has ".$ver.". Please specify version with --version.\n";
+        }
+    }
 
     # final sanitazing of name and version
     $name =~ s/::/-/g if defined $name;

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

_______________________________________________
Pkg-perl-cvs-commits mailing list
Pkg-perl-cvs-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to