View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Curtis "Ovid" Poe > Code-CutNPaste-0.30 > find_duplicate_perl


Annotate this POD


New  2
Open  0
View/Report Bugs
Source   Latest Release: Code-CutNPaste-0.31




 find_duplicate_perl lib some_other_dir


Takes a list of directories and files as arguments and searches for duplicate Perl code in all files it finds there. For directories, we (currently) match files ending in .pm, .pl and .t. This limitation can be avoided by passing in the list of files directly ... or submitting a patch.

Because the program can take a long time to run, we use Term::ProgressBar to track the progress. Note that even though it shows an ETA (estimated time of arrival) for how long we'll take to run, this number is often wildly inaccurate and is there to make you feel better.


 --window=$window     Set minimum number of lines to look for duplicate code (default 5)
 --exact              If used, will ignore renamed variables and subs
 --ignore=$regex      A regex of duplicate code snippets to ignore (may be repeated)
 --show_warnings      If for some reason a file cannot load, use this to show the reason why
 --jobs=$num_jobs     Number of jobs to run (default 1)
 --threshold=$percent Between 0 and 1. % of lines which must match C<\w> (default .75)
 --noutf8             Disables loading of utf8::all.
syntax highlighting: