develooper Front page | perl.module-authors | Postings from November 2003

I need a better name than File_Shred

Thread Next
Jim Cromie
November 14, 2003 00:34
I need a better name than File_Shred
Message ID:
Hi folks,

Ive written a module which implements Eric Raymonds 'shred'
program, which is pretty well described here.

File::Shred is my working name

My version has a different focus, namely to find duplicate code chunks,
write macros for them, and invoke those macros.  So maybe a different name
is appropriate.


a Perl version would create a string-eval equivalent:
     my $MACRO_NNN = q{ .... }
    eval $MACRO_NNN;

given its basis in MD5, it cannot find even trivial differences in 2 chunks,

FWIW - Ive applied it to bleadperl source code, and am getting what look 
like reasonable
results, though I havent tried compiling yet.  (I will b4 the .01 release)
Ok, I did, it breaks, have to avoid chunks with unbalanced #ifdefs..


[jimc@harpo bleadperl]$ ls * |wc
     35      35     415
[jimc@harpo bleadperl]$ more *.c.macros |wc
   2987    9814   68087
[jimc@harpo bleadperl]$ grep MACRO *.c.macros |wc
    282    1128   14004
[jimc@harpo bleadperl]$ grep MACRO * |wc
    428     856   15234

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About