App-diffwc
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
script/diffwc view on Meta::CPAN
#!perl
our $DATE = '2021-07-08'; # DATE
our $VERSION = '0.007'; # VERSION
use strict;
use warnings;
use Getopt::Long::Complete;
my %Opts = (
postprocess => 1,
format => 'context',
color => $ENV{COLOR} // (-t STDOUT),
);
sub sanity_check {
require File::Which;
File::Which::which("diff") or die "diffwc: Can't find diff in PATH\n";
}
sub parse_cmdline {
local @ARGV = @ARGV;
# updated to diff 3.3 + color
GetOptions(
normal => sub {},
'brief|q' => sub {},
'report-identical-files|s' => sub {},
'c' => sub { $Opts{format} = 'context' },
'context|C' => sub { $Opts{format} = 'context' }, # XXX should've been context|C:i, but currently not supported by GLC
'u' => sub { $Opts{format} = 'unified' },
'unified|U' => sub { $Opts{format} = 'unified' }, # XXX should've been unified|U:i, but currently not supported by GLC
'ed|e' => sub {},
'rcs|n' => sub {},
'side-by-side|y' => sub { $Opts{format} = 'side-by-side' },
'width|W=i' => sub {},
'left-column' => sub {},
'suppress-common-lines' => sub {},
'show-c-function|p' => sub {},
'show-function-line|F=s' => sub {},
'label=s' => sub {},
'expand-tabs|t' => sub {},
'initial-tab|T' => sub {},
'tabsize=i' => sub {},
'suppress-blank-empty' => sub {},
'paginate|l' => sub {},
'recursive|r' => sub {},
'new-file|N' => sub {},
'unidirectional-new-file' => sub {},
'ignore-file-name-case!' => sub {},
'exclude|x=s' => sub {},
'exclude-from|X=s' => sub {}, # filename
'starting-file|S' => sub {}, # filename
'from-file=s' => sub {}, # filename
'to-file=s' => sub {}, # filename
'ignore-case|i' => sub {},
'ignore-tab-expansion|E' => sub {},
'ignore-trailing-space|Z' => sub {},
'ignore-space-change|b' => sub {},
'ignore-all-space|w' => sub {},
'ignore-blank-lines|B' => sub {},
'ignore-matching-lines|I=s' => sub {},
'text|a' => sub {},
'strip-trailing-cr' => sub {},
'ifdef|D=s' => sub {},
'GTYPE-group-format=s' => sub {},
'line-format=s' => sub {},
'LTYPE-line-format=s' => sub {},
'minimal|d' => sub {},
'horizon-lines=i' => sub {},
'speed-large-files' => sub {},
'help' => sub {},
'version|v' => sub {},
# user asks for diff's --color, let's skip post-processing then
'color' => sub { $Opts{postprocess} = 0 },
);
}
sub run {
require App::diffwc;
require ShellQuote::Any::Tiny;
view all matches for this distributionview release on metacpan - search on metacpan
( run in 6.509 seconds using v1.00-cache-2.02-grep-82fe00e-cpan-c30982ac1bc3 )