aboutsummaryrefslogtreecommitdiff
path: root/utils/scancpan
diff options
context:
space:
mode:
authorGravatar Francois Perrad <fperrad@gmail.com>2018-10-10 08:46:09 +0200
committerGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2018-10-10 09:05:41 +0200
commit228b6b680a377d761c4e4773d24b313e16bcd9f6 (patch)
tree8ee2f5af7eedba288b3d74ea7369e8ce28f8ae9c /utils/scancpan
parente1f9882088786600445e0c6da38dc35f87af286b (diff)
downloadbuildroot-228b6b680a377d761c4e4773d24b313e16bcd9f6.tar.gz
buildroot-228b6b680a377d761c4e4773d24b313e16bcd9f6.tar.bz2
scancpan: wrap abstract if too long
[note: code style fixed] Signed-off-by: Christopher McCrory <chrismcc@gmail.com> Signed-off-by: Francois Perrad <francois.perrad@gadz.org> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'utils/scancpan')
-rwxr-xr-xutils/scancpan4
1 files changed, 3 insertions, 1 deletions
diff --git a/utils/scancpan b/utils/scancpan
index 5e6775afae..0724049441 100755
--- a/utils/scancpan
+++ b/utils/scancpan
@@ -484,6 +484,8 @@ use HTTP::Tiny;
use Safe;
use MetaCPAN::API::Tiny;
use Digest::SHA qw(sha256_hex);
+use Text::Wrap;
+$Text::Wrap::columns = 62;
# Below, 5.026 should be aligned with the version of perl actually
# bundled in Buildroot:
@@ -686,7 +688,7 @@ while (my ($distname, $dist) = each %dist) {
my $brname = brname( $fsname );
mkdir $dirname unless -d $dirname;
if ($need_target{$distname} && ($force || !-f $cfgname)) {
- my $abstract = $dist->{abstract};
+ my $abstract = wrap( q{}, qq{\t }, $dist->{abstract} );
my $homepage = $dist->{resources}->{homepage} || qq{https://metacpan.org/release/${distname}};
say qq{write ${cfgname}} unless $quiet;
open my $fh, q{>}, $cfgname;