[dh-make-perl] 02/07: DhMakePerl::Command::Packaging: strip leading articles from short description.

gregor herrmann gregoa at debian.org
Fri Aug 26 23:35:48 UTC 2016


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 cf953ae19d6e467eb9f1c935e51696d3fcd7ba0d
Author: gregor herrmann <gregoa at debian.org>
Date:   Sat Aug 27 00:07:35 2016 +0200

    DhMakePerl::Command::Packaging: strip leading articles from short description.
---
 lib/DhMakePerl/Command/Packaging.pm | 3 ++-
 t/dists/Strange-2.1/Strange.pm      | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/DhMakePerl/Command/Packaging.pm b/lib/DhMakePerl/Command/Packaging.pm
index 59a38f2..4f4720d 100644
--- a/lib/DhMakePerl/Command/Packaging.pm
+++ b/lib/DhMakePerl/Command/Packaging.pm
@@ -696,7 +696,8 @@ sub extract_desc {
         # Replace linefeed (not followed by a space) in short description with
         # spaces
         $short_desc =~ s/\n(?=\S)/ /gs;
-        $short_desc =~ s/^\s+//;      # strip leading spaces
+        $short_desc =~ s/^\s+//;                   # strip leading spaces
+        $short_desc =~ s/^(?:(A|An|The))\s+//i;    # strip leading article
     }
 
     # have a fall-back for the short description
diff --git a/t/dists/Strange-2.1/Strange.pm b/t/dists/Strange-2.1/Strange.pm
index 058bacc..4727279 100644
--- a/t/dists/Strange-2.1/Strange.pm
+++ b/t/dists/Strange-2.1/Strange.pm
@@ -52,7 +52,7 @@ __END__
 
 =head1 NAME
 
-Strange - Perl extension for blah blah blah
+Strange - A Perl extension for blah blah blah
 
 =head1 SYNOPSIS
 

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