[Buildroot] [PATCH 1/3] scancpan: wrap abstract if too long

François Perrad fperrad at gmail.com
Tue Aug 21 05:52:07 UTC 2018


2018-08-20 13:16 GMT+02:00 Christopher McCrory <chrismcc at gmail.com>:

> Signed-off-by: Christopher McCrory <chrismcc at gmail.com>
> ---
>  utils/scancpan | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/utils/scancpan b/utils/scancpan
> index 8f47521692..6c90588ed4 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:
> @@ -663,7 +665,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("","\t  ",$dist->{abstract});
>

please, be consistent with the coding style, like this :
             my $abstract = wrap( q{}, qq{\t  }, $dist->{abstract} );

François

         my $homepage = $dist->{resources}->{homepage} || qq{
> https://metacpan.org/release/${distname}};
>          say qq{write ${cfgname}} unless $quiet;
>          open my $fh, q{>}, $cfgname;
> --
> 2.14.4
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180821/853eb747/attachment-0002.html>


More information about the buildroot mailing list