Bug#530675: dh-make-perl: uninit warning building cpan libintl-perl

Damyan Ivanov dmn at debian.org
Wed May 27 10:18:21 UTC 2009


-=| gregor herrmann, Wed, May 27, 2009 at 11:53:44AM +0200 |=-
> On Wed, 27 May 2009 12:18:28 +0300, Damyan Ivanov wrote:
> > > dh-make-perl gives a warning
> > >     Use of uninitialized value in pattern match (m//) at /usr/share/perl5/DhMakePerl.pm line 545.
> > The warning is present in trunk too. The cause is that no --cpan 
> > option is given and the dist name matches /-perl$/. Here's the code:
> > 
> >     ( $perlname, $version ) = $self->extract_name_ver();
> >     $pkgname = lc $perlname;
> >     $pkgname = 'lib' . $pkgname unless $pkgname =~ /^lib/; <===
> >     $pkgname .= '-perl'
> >         unless ( $pkgname =~ /-perl$/
> >             and $self->cfg->cpan !~ /::perl$/i );
> > 
> > As I see it (unless !~ is confusing me) , the idea is to not append 
> > -perl to package name if it is already there, unless -perl$ was 
> > specified on the command line. So things like File::Find::Rule::Perl 
> > get a package name of libfile-find-rule-perl-perl.
> 
> Yup, but IIRC (I took a short look yesterday) the warning comes from
> the line marked with "<==" above, which means that $pkgname is not
> initialized which means that the problem is with $perlname which
> means that $self->extract_name_ver() would need some investigation
> (that's when I went to bed :)).

I tried again with plain 0.55 frm the archive. Same warning as 
reported, and lines are:

545     $pkgname .= '-perl'
546         unless ( $pkgname =~ /-perl$/ and $self->cfg->cpan !~ /::perl$/i );

Seems you had an off-by-one error :)


-- 
dam
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20090527/be71dbb3/attachment.pgp>


More information about the pkg-perl-maintainers mailing list