CP_reporter [options] path1 path2 ...
CP_reporter reads the specified files and analyses the content for repeated substrings as they might occur when copying and pasting code.
When a duplication is found, the position and range is reported for each copy found and the duplicated content is printed once.
The findings are sorted by length in bytes.
The arguments are paths which can be directory paths or file paths or glob expressions.
Sets the minimum extent a duplication should have to be reported. Two units are supported: positive numbers indicate 'lines' while negative numbers specify 'bytes'.
Specifies the directory that is scanned recursively for files.
Suppress the report of all duplications that match the ignore filter.
For example /\A(^#.+$)+\z/ would suppress a duplication when all lines of it begin with a comment.
Suppress the output of the content of a duplication. Only positions of duplications are printed out.
No rc file yet.
Limited to 8-bit characters yet.
No text preprocessing yet ( e.g. whitespace shrinking or comments elimination)
No real parsing of Perl code yet.
This program was inspired a bit by Ovids find_duplicate_code.pl
To install Code::DRY, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Code::DRY
CPAN shell
perl -MCPAN -e shell install Code::DRY
For more information on module installation, please visit the detailed CPAN module installation guide.