[Israel.pm] static code Analyzer?
Gaal Yahas
gaal at forum2.org
Fri Aug 24 08:20:41 PDT 2007
On 8/24/07, Shmuel Fomberg <semuelf at 012.net.il> wrote:
> Hello There.
>
> Does anyone know a static code analyzer for Perl?
> I need something to find dead code in my project.
> Don't need something complicated. Just if the name of the function does
> not appear in the code, declare it dead.
> Like doing "find-in-files" for every sub in the project, and see that
> someone is using it.
>
> Is there?
There isn't.
perl -le '(join "", map { (0..9,"a".."z","A".."Z","_")[rand 63] }
0..rand 256)->(); sub AUTOLOAD { print $AUTOLOAD }'
This calls a routine in main:: with a name selected by random every
time. It's trivial to change this to call into other namespaces as
well. If you want find in files, do find in files.
--
Gaal Yahas <gaal at forum2.org>
http://gaal.livejournal.com/
More information about the Perl
mailing list