finding invalid method names

I

ivan

Hi,

I would like to run a command on my perl scripts / modules to find out if
there are any method names that are being called which are not defined.

So for example where I run:

perl -c test.pl

on this script:
1 #!/usr/bin/perl
2 use strict;
3
4 blah_blah_foo();

The result is test.pl syntax OK.

Is there any other program i can run to do a static analysis of perl code
and find these errors?

Thanks,
 
T

Tad McClellan

Hi,

I would like to run a command on my perl scripts / modules to find out if
there are any method names that are being called which are not defined.

So for example where I run:

perl -c test.pl

on this script:
1 #!/usr/bin/perl
2 use strict;
3
4 blah_blah_foo();


There are no method calls anywhere in that code.
 
M

Michael Carman

I would like to run a command on my perl scripts / modules to find out if
there are any method names that are being called which are not defined.

Method dispatch happens at runtime. There's really no way for a static analysis
tool to determine whether or not a given method call is valid.
perl -c test.pl

on this script:
1 #!/usr/bin/perl
2 use strict;
3
4 blah_blah_foo();

The result is test.pl syntax OK.

Umm, as Tad said, there are no method calls in that code. Did you want to ask
about detecting undefined *subroutines*?

-mjc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top