Massage $summary (capitalize, remove trailing ".", remove leading "A").
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
1.65
|
1.65
|
||||||
|
|
||||||
* Exclude inc (suggested by Ian Burrell).
|
* Exclude inc (suggested by Ian Burrell).
|
||||||
* Capitalize $summary.
|
* Massage $summary (capitalize, remove trailing ".", remove leading "A").
|
||||||
|
|
||||||
1.64 2006-03-24
|
1.64 2006-03-24
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
#
|
#
|
||||||
# $Id: cpanspec,v 1.19 2006/04/10 20:47:49 stevenpritchard Exp $
|
# $Id: cpanspec,v 1.20 2006/04/10 21:01:52 stevenpritchard Exp $
|
||||||
|
|
||||||
my $NAME="cpanspec";
|
my $NAME="cpanspec";
|
||||||
my $VERSION='1.65';
|
my $VERSION='1.65';
|
||||||
@@ -391,7 +391,12 @@ sub get_description(%) {
|
|||||||
$description=$1;
|
$description=$1;
|
||||||
}
|
}
|
||||||
if ($rendered=~/NAME\s*$args{module}\s[-\s]*(\S[^\n]*)/s) {
|
if ($rendered=~/NAME\s*$args{module}\s[-\s]*(\S[^\n]*)/s) {
|
||||||
$summary=ucfirst($1) if ($1 ne "SYNOPSIS");
|
if ($1 ne "SYNOPSIS") {
|
||||||
|
$summary=$1;
|
||||||
|
$summary=~s/[.\s]+//;
|
||||||
|
$summary=~s/^A\s+//i;
|
||||||
|
$summary=ucfirst($summary);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return($description, $summary) if (defined($description));
|
return($description, $summary) if (defined($description));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user