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

I need a better name than File_Shred

Thread Next
From:
Jim Cromie
Date:
November 14, 2003 00:34
Subject:
I need a better name than File_Shred
Message ID:
3FB4936F.6050209@divsol.com
Hi folks,

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

http://www.arstechnica.com/archive/news/1063140308.html

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.

File::Macrofy
File::Macroize::C

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..

anyway,

[jimc@harpo bleadperl]$ ls *.c.new |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 *.c.new |wc
    428     856   15234




Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About