For Programmers: Free Programming Magazines  


Home > Archive > PERL Miscellaneous > April 2007 > Re: finding invalid method names









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: finding invalid method names
Michael Carman

2007-04-27, 10:01 pm

On 4/27/2007 5:41 PM, ivan@0x4849.net wrote:
>
> 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
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com