Subject: | Carp::Always + strict => stict works wrong |
Date: | Fri, 16 Mar 2012 22:47:44 +0400 |
To: | bug-Carp-Always [...] rt.cpan.org |
From: | Nikolay Shaplov <n [...] shaplov.ru> |
When you use both Carp::Always and strict, strict stops properly detect the
line number of not declared variables:
=====================
#!/usr/bin/perl
use strict;
use Carp::Always;
$z=1;
print "the end\n";
====================
This script will say
Global symbol "$z" requires explicit package name at ./carp.pl line 16
through $z is mentioned at line 5.
If you comment out use Carp::Always, strict will work properly and say about
line 5 as it should.
I do not think there can be an error in strict, error in Carp::Always is more
probable in my opinion. If not, tell me, I will report this to strict
maintainers :-)