Bug#664150: dh-make-perl: Fails to parse "perl_5" in META.json as a license

gregor herrmann gregoa at debian.org
Thu Mar 15 23:05:53 UTC 2012


tag 664150 + confirmed
thanks

On Thu, 15 Mar 2012 22:12:03 +0100, Per Carlson wrote:

> pelle at devel:~/src/netaudit$ cat META.json 
> {
>    "license" : [
>       "perl_5"
>    ],
>    ...
> }
> 
> Of some reason dh-make-perl does not pick up this, even though it tries to
> match on /perl/i.

Seems like it stumbles over the array;
        print "META says: ", Dumper $self->meta->{license};
outputs:

META says: $VAR1 = [
          'perl_5'
        ];


Changing

        if (   $self->meta->{license} and $self->meta->{license} =~ /perl/i

to

        if (   $self->meta->{license} and $self->meta->{license} ~~ /perl/i

works in this case (lib/DhMakePerl/Command/Packaging.pm, line 1065).

Not sure about any side effects, in theory it should work for both
scalars and arrays, and smart matching exists since 5.10 ...
 

Cheers,
gregor

-- 
 .''`.  Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer  -  http://www.debian.org/
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: The Doors: L.A. Woman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20120316/5b43dd5c/attachment.pgp>


More information about the pkg-perl-maintainers mailing list