The Config::General module can read Apache-style config files. You should then be able 
to compare the contents of the files by comparing the hash tables returned by 
Config::General.
 
Luke

        -----Original Message----- 
        From: Dusan Juhas [mailto:[EMAIL PROTECTED] 
        Sent: Mon 12/15/2003 2:09 AM 
        To: [EMAIL PROTECTED] 
        Cc: 
        Subject: advanced diff in Perl
        
        

        Hello,
        
        is there any library/utility which can help me to compare 2 different
        config files (eg. Apache, PHP)?
        I'd like to see _only_ parameters which are missing either in
        config_file1 or config_file2 and those parameters which are different.
        
        Standard diff can not make this. (comments,white chars...)
        
        Enhanced diff:
        1.replace comments (awk/sed)
        2.sort lines
        3.diff -b
        is better but still not sufficient because some parameters are multi-lined:
        
        myparam = This is my \
        long setting
        
        and some of them are within specific context:
        
        <mydir1>
        mysetting = 1
        </mydir1>
        
        <mydir2>
        mysetting = 2
        </mydir2>
        
        --
        Best regards,
        Dusan Juhas
        
        
        --
        To unsubscribe, e-mail: [EMAIL PROTECTED]
        For additional commands, e-mail: [EMAIL PROTECTED]
        <http://learn.perl.org/> <http://learn.perl.org/first-response>
        
        
        

Reply via email to