Bug#530675: dh-make-perl: uninit warning building cpan libintl-perl
gregor herrmann
gregoa at debian.org
Wed May 27 09:53:44 UTC 2009
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 think that the while condition
> shall be dropped, i.e.
> $pkgname .= '-perl';
> How does this sound?
I agree, but unless I missed something yesterday the warning will
still happen in the line before :)
Cheers,
gregor
--
.''`. Home: http://info.comodo.priv.at/{,blog/} / GPG Key ID: 0x00F3CFE4
: :' : Debian GNU/Linux user, admin, & developer - http://www.debian.org/
`. `' Member of VIBE!AT, SPI Inc., fellow of FSFE | http://got.to/quote/
`- "Rome wasn't burned in a day. "
More information about the pkg-perl-maintainers
mailing list