P is for Practical | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
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'; In reply to Re: Re: Re: wishlist: static analysis of perl modules
by seattlejohn
|
|