[dh-make-perl] 02/02: create_copyright: use copyright year from dist.ini (copyright_year)

Damyan Ivanov dmn at moszumanska.debian.org
Sun May 24 10:20:30 UTC 2015


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 1967917d718edebac036e0145235c0990f391fe3
Author: Damyan Ivanov <dmn at debian.org>
Date:   Sun May 24 10:20:23 2015 +0000

    create_copyright: use copyright year from dist.ini (copyright_year)
---
 lib/DhMakePerl/Command/Packaging.pm | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/lib/DhMakePerl/Command/Packaging.pm b/lib/DhMakePerl/Command/Packaging.pm
index 25e0305..d2a6cba 100644
--- a/lib/DhMakePerl/Command/Packaging.pm
+++ b/lib/DhMakePerl/Command/Packaging.pm
@@ -981,9 +981,16 @@ sub create_copyright {
     # information for anything besides general information.
     push @res, 'Files: *';
 
+    my $cprt_year;
+    if (    $self->dist_ini
+        and $self->dist_ini->{_}{copyright_year} )
+    {
+        $cprt_year = $self->dist_ini->{_}{copyright_year};
+    }
     # Absence of author should have already been reported in the
     # Header section
-    push @res, "Copyright: $cprt_author";
+    push @res,
+        "Copyright: " . ( $cprt_year ? "$cprt_year, " : '' ) . $cprt_author;
 
     # This is far from foolproof, but usually works with most
     # boilerplate-generated modules.

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