#!/usr/local/bin/perl use strict; use warnings; use VCS::Lite; use Getopt::Long; my $uflag = 0; my $wintxt = ''; GetOptions( 'unified+' => \$uflag, 'window=s' => \$wintxt, ); if (@ARGV != 2) { print <new(shift @ARGV); my $el2 = VCS::Lite->new(shift @ARGV); my $win = 0; if ($wintxt =~ /(\d+),(\d+)/) { $win = [$1,$2]; } elsif ($wintxt =~ /(\d+)/) { $win = $1; } my $dt1 = $el1->delta($el2, window => $win); my $diff = $uflag ? $dt1->udiff : $dt1->diff; print $diff;