in reply to Detecting undefined subroutines at compile time
E.g. I have a patch of B::Deparse which extracts all such calls, but this opens new problems since compiling perl involves executing BEGIN{} blocks.
IIRC there are also moduls in CORE to parse packages like etags and ctags do.¹
Cheers Rolf
UPDATES:
1) I was thinking of B::Xref
~:/tmp$ cat tst.pl foo(); sub foo { print } foo(); ~:/tmp$ perl -MO=Xref,-d tst.pl File tst.pl Subroutine (main) Package main &foo &1, &4 tst.pl syntax OK ~:/tmp$
so you can find all calls, now you just have to check the STASHes in a BEGIN Block.
HTH!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Detecting undefined subroutines at compile time
by Corion (Patriarch) on May 02, 2011 at 18:10 UTC | |
by LanX (Saint) on May 02, 2011 at 18:15 UTC |