in reply to Finding duplicated code in Perl
My first thought is to run your code through B::Concise, perhaps use Idealized optrees from B::Concise to simplify the output and then look for subtrees that are equal. From there you are free to do something useful with the filename and line number hints scattered at every ';' node. In fact, you could automate this by writing a script to run B::Concise, find equal trees and then annotate the original code with comments that match.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Finding duplicated code in Perl
by shushu (Scribe) on Nov 26, 2003 at 14:29 UTC | |
by diotalevi (Canon) on Nov 26, 2003 at 15:22 UTC | |
by adamk (Chaplain) on Nov 27, 2003 at 01:42 UTC |