<?xml version="1.0" encoding="windows-1252"?>
<node id="310219" title="Finding duplicated code in Perl" created="2003-11-26 07:49:27" updated="2005-08-06 04:52:14">
<type id="115">
perlquestion</type>
<author id="60757">
shushu</author>
<data>
<field name="doctext">
Hallo monks,&lt;br&gt;
I am a new owner of a huge project, that currently contain 2.5M lines of code.&lt;br&gt;
The first version was written in an internal language we developed, which was &lt;b&gt;VERY&lt;/b&gt; simple - no loops, no subroutines, no modules, no conditions, and when we moved to the new version we created a converter, which converted the code to Perl.&lt;br&gt;
The convertion was simple, therefore I had 3000 flat script, and today I have 3000 flat script, just in Perl. My new task is to take those scripts, find code duplications, and produce modules and subroutines.&lt;br&gt;
I am looking for a tool that will find the duplications for me.&lt;br&gt;
&lt;br&gt;
Looking in the net I found several tools:&lt;br&gt;
&lt;A HREF=http://pmd.sourceforge.net/cpd.html&gt;http://pmd.sourceforge.net/cpd.html&lt;/A&gt;&lt;br&gt;
&lt;A HREF=http://www.blue-edge.bg/download.html&gt;http://www.blue-edge.bg/download.html&lt;/A&gt;
&lt;br&gt;
and some commercial ones.&lt;br&gt;
&lt;br&gt;
The problem is - they do not support Perl.&lt;br&gt;
Before I run and create a support for Perl in those projects (as suggested in &lt;a href=http://www.onjava.com/pub/a/onjava/2003/03/12/pmd_cpd.html&gt;http://www.onjava.com/pub/a/onjava/2003/03/12/pmd_cpd.html&lt;/a&gt;), I would like to know whether there is another solution, or another tool that already has Perl support.&lt;br&gt;
&lt;br&gt;
TIA,&lt;br&gt;
shushu&lt;br&gt;</field>
</data>
</node>
