Subject: | false positives with Devel::Declare |
Date: | Thu, 7 Mar 2013 12:23:52 +0000 |
To: | bug-indirect [...] rt.cpan.org |
From: | Zefram <zefram [...] fysh.org> |
indirect-0.29 still generates some of the false positives that were
behind the bug report for 0.28 [rt.cpan.org #83659], specifically the
ones involving Devel::Declare. Test case:
$ perl -v | grep This
This is perl 5, version 16, subversion 1 (v5.16.1) built for x86_64-linux-ld
$ cat t0
use Devel::Declare 0.006007 ();
sub foo { }
sub foo_magic {
my($declarator, $offset) = @_;
$offset += Devel::Declare::toke_move_past_token($offset);
my $linestr = Devel::Declare::get_linestr();
substr $linestr, $offset, 0, "\n\n";
Devel::Declare::set_linestr($linestr);
}
BEGIN { Devel::Declare->setup_for("main", { foo => { const => \&foo_magic } }); }
no indirect ":fatal";
my $x;
foo; $x->m;
1;
$ perl -c t0
Indirect call of method "m" on object "$x" at t0 line 15.
-zefram