in reply to A directory diff
Nice work, overall. The bit in the middle violates Don't Repeat Yourself, though.
sub print_diff { my ( $decor, $dir, @filename ) = @_; my $prefix = ( ( $opt_plain ? "$decor " : '' ) . ( defined $dir ? "$dir " : '' ) ); print map "$prefix$_\n", @filename; } if ( not( $opt_bonly or $opt_jonly ) ) { print_diff '<', $dirname1, diff( \@dir1, \@dir2 ); } if ( not( $opt_aonly or $opt_jonly ) ) { print_diff '>', $dirname2, diff( \@dir2, \@dir1 ); } if ( $opt_inter or $opt_jonly ) { print_diff '=', '', isect( \@dir1, \@dir2 ); }
Makeshifts last the longest.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: A directory diff
by hsmyers (Canon) on Aug 26, 2004 at 12:55 UTC | |
by Aristotle (Chancellor) on Aug 26, 2004 at 22:27 UTC | |
by hsmyers (Canon) on Aug 27, 2004 at 14:29 UTC |