Look in $name.pod for %description and Summary also.

Avoid useless "Summary: SYNOPSIS".
This commit is contained in:
stevenpritchard
2006-03-24 01:07:23 +00:00
parent a833b1932b
commit ff68118ba1
3 changed files with 13 additions and 6 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ my $builder = Module::Build->new(
module_name => 'cpanspec',
license => 'perl',
dist_author => 'Steven Pritchard <steve@cpan.org>',
dist_version => '1.62',
dist_version => '1.63',
requires => {
'Archive::Tar' => 0,
'Archive::Zip' => 0,
+5
View File
@@ -1,3 +1,8 @@
0.63
* Look in $name.pod for %description and Summary also.
* Avoid useless "Summary: SYNOPSIS".
0.62 2006-03-22
* Improve auto-detection of %description and Summary.
+7 -5
View File
@@ -10,10 +10,10 @@
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# $Id: cpanspec,v 1.13 2006/03/23 01:57:12 stevenpritchard Exp $
# $Id: cpanspec,v 1.14 2006/03/24 01:07:23 stevenpritchard Exp $
my $NAME="cpanspec";
my $VERSION='1.62';
my $VERSION='1.63';
=head1 NAME
@@ -355,9 +355,11 @@ sub get_description(%) {
my $path=$args{module};
$path=~s,::,/,g;
my @pmfiles=("$args{name}-$args{version}/lib/$path.pm");
my @pmfiles=("$args{name}-$args{version}/lib/$path.pod",
"$args{name}-$args{version}/lib/$path.pm");
do {
push(@pmfiles, "$args{name}-$args{version}/$path.pm");
push(@pmfiles, "$args{name}-$args{version}/$path.pod",
"$args{name}-$args{version}/$path.pm");
} while ($path=~s,^[^/]+/,,);
push(@pmfiles, "$args{name}-$args{version}/$args{module}")
if ($args{module} !~ /::/);
@@ -383,7 +385,7 @@ sub get_description(%) {
$description=$1;
}
if ($rendered=~/NAME\s*$args{module}\s[-\s]*(\S[^\n]*)/s) {
$summary=$1;
$summary=$1 if ($1 ne "SYNOPSIS");
}
return($description, $summary) if (defined($description));
}