Bug#521609: Warning: Name "Archive::Tar::WARN" used only once: possible typo
Niko Tyni
ntyni at debian.org
Sun Mar 29 19:04:10 UTC 2009
On Sat, Mar 28, 2009 at 11:30:32PM +0100, Vincent Lefevre wrote:
> Package: perl-modules
> Version: 5.10.0-19
> Severity: minor
> #!/usr/bin/env perl
> use warnings;
> require Archive::Tar;
> $Archive::Tar::WARN = 0;
>
> gives the following warning when run:
>
> vin:~> ./tst
> Name "Archive::Tar::WARN" used only once: possible typo at ./tst line 4.
This is expected behaviour: it's a compile-time warning and you're
explicitly loading Archive::Tar at run time.
> A workaround can be to duplicate the line
>
> $Archive::Tar::WARN = 0;
Indeed, this is even mentioned in the corresponding 'perldiag' entry.
Alternatively, either of
use vars qw($Archive::Tar::WARN);
no warnings 'once';
would also do.
What exactly do you want fixed here?
--
Niko Tyni ntyni at debian.org
More information about the Perl-maintainers
mailing list