Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Re: Re: wishlist: static analysis of perl modules

by seattlejohn (Deacon)
on Feb 23, 2003 at 23:33 UTC ( [id://237981]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: wishlist: static analysis of perl modules
in thread wishlist: static analysis of perl modules

I wanted to second zengargoyle's comment above (++). If you restate the problem as finding subroutines which are never mentioned, as opposed to called, you could do various grep-type searches. Of course, Perl's complex syntax makes it difficult to identify even mentions of subroutines with real precision. If you have a sub called add, for example, you need to know that print "add" is not a subroutine call, but that print "@{[ add ]}" is.)

As for edit my code and change names of a variable or subroutine, wherever it's referred to... well, I admit I typically use a low-tech solution in my editor called "search and replace" :-)

To warn me about private subroutines (sub _foo) being called from outside their class/subclasses: Seems like you could insert a line at the beginning of the private sub that would check UNIVERSAL::isa to see if the calling object is a descendant of the appropriate type.

And finally, increase my attractiveness to women. I am inclined to respond that "I have discovered a truly remarkable technique which this textbox is too small to contain." (With tongue firmly in cheek, and copious apologies to Pierre de Fermat.)

        $perlmonks{seattlejohn} = 'John Clyman';

Replies are listed 'Best First'.
Re: Re: Re: Re: wishlist: static analysis of perl modules
by dash2 (Hermit) on Feb 24, 2003 at 15:00 UTC
    I am inclined to respond that "I have discovered a truly remarkable technique which this textbox is too small to contain."

    "technique"? that's a new word for it (woof woof)

    look what's bursting out of his textbox (fnarr fnarr)

    dave hj~

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://237981]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (7)
As of 2024-03-29 08:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found