Look in $name.pod for %description and Summary also.
Avoid useless "Summary: SYNOPSIS".
This commit is contained in:
1 parent
a833b1932b
commit
ff68118ba1
3 files changed
+13
-6
No files matched your search
@@ -6,7 +6,7 @@ my $builder = Module::Build->new(
|
|||||||
module_name => 'cpanspec',
|
module_name => 'cpanspec',
|
||||||
license => 'perl',
|
license => 'perl',
|
||||||
dist_author => 'Steven Pritchard <steve@cpan.org>',
|
dist_author => 'Steven Pritchard <steve@cpan.org>',
|
||||||
dist_version => '1.62',
|
dist_version => '1.63',
|
||||||
requires => {
|
requires => {
|
||||||
'Archive::Tar' => 0,
|
'Archive::Tar' => 0,
|
||||||
'Archive::Zip' => 0,
|
'Archive::Zip' => 0,
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
|
0.63
|
||||||
|
|
||||||
|
* Look in $name.pod for %description and Summary also.
|
||||||
|
* Avoid useless "Summary: SYNOPSIS".
|
||||||
|
|
||||||
0.62 2006-03-22
|
0.62 2006-03-22
|
||||||
|
|
||||||
* Improve auto-detection of %description and Summary.
|
* Improve auto-detection of %description and Summary.
|
||||||
|
|||||||
@@ -10,10 +10,10 @@
|
|||||||
# 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.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 $NAME="cpanspec";
|
||||||
my $VERSION='1.62';
|
my $VERSION='1.63';
|
||||||
|
|
||||||
=head1 NAME
|
=head1 NAME
|
||||||
|
|
||||||
@@ -355,9 +355,11 @@ sub get_description(%) {
|
|||||||
|
|
||||||
my $path=$args{module};
|
my $path=$args{module};
|
||||||
$path=~s,::,/,g;
|
$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 {
|
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,^[^/]+/,,);
|
} while ($path=~s,^[^/]+/,,);
|
||||||
push(@pmfiles, "$args{name}-$args{version}/$args{module}")
|
push(@pmfiles, "$args{name}-$args{version}/$args{module}")
|
||||||
if ($args{module} !~ /::/);
|
if ($args{module} !~ /::/);
|
||||||
@@ -383,7 +385,7 @@ 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=$1;
|
$summary=$1 if ($1 ne "SYNOPSIS");
|
||||||
}
|
}
|
||||||
return($description, $summary) if (defined($description));
|
return($description, $summary) if (defined($description));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user