]> git.vpit.fr Git - perl/modules/CPANPLUS-Dist-Gentoo.git/commitdiff
Set a better default description
authorVincent Pit <vince@profvince.com>
Wed, 15 Dec 2010 23:01:28 +0000 (00:01 +0100)
committerVincent Pit <vince@profvince.com>
Wed, 15 Dec 2010 23:01:28 +0000 (00:01 +0100)
lib/CPANPLUS/Dist/Gentoo.pm

index d5a7b79dd375add110e358c90717d0217ad8268c..6115b384607292b9f44a458a6cb8c291620e0361 100644 (file)
@@ -359,7 +359,10 @@ sub prepare {
  return $FAIL->() unless $stat->prepared;
 
  my $desc = $mod->description;
- ($desc = $name) =~ s/-+/::/g unless $desc;
+ $desc    = $mod->comment                unless $desc;
+ $desc    = "$name Perl distribution (provides " . $mod->module . ')'
+                                         unless $desc;
+ $desc    = substr($desc, 0, 77) . '...' if length $desc > 80;
  $stat->desc($desc);
 
  $stat->uri('http://search.cpan.org/dist/' . $name);