| 1 | package App::sdif; | ||||||||||||
| 2 | 34 | ▶ | use v5.14; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 3 | 34 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 4 | |||||||||||||
| 5 | 34 | ▶ | use Exporter 'import'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 6 | 34 | our @EXPORT = qw(usage); | |||||||||||
| 7 | 34 | our %EXPORT_TAGS = (); | |||||||||||
| 8 | 34 | our @EXPORT_OK = qw(); | |||||||||||
| 9 | |||||||||||||
| 10 | 34 | our $VERSION = "4.49"; | |||||||||||
| 11 | |||||||||||||
| 12 | 34 | ▶ | use Pod::Usage; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 13 | |||||||||||||
| 14 | 0 | ▶ | sub usage { | ||||||||||
|
Subroutine
usage: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||
| 15 | 0 | ▶ | my $opt = ref($_[0]) eq 'HASH' ? shift : {}; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 16 | 0 | select STDERR; | |||||||||||
| 17 | 0 | print @_; | |||||||||||
| 18 | 0 | pod2usage(-verbose => 0, -exitval => "NOEXIT"); | |||||||||||
| 19 | 0 | print "Version: $VERSION\n"; | |||||||||||
| 20 | 0 | ▶ | exit($opt->{status} // 0); | ||||||||||
|
Condition0%0/2
$opt->{"status"} // 0
MC/DC0%0/1
$opt->{"status"} // 0
$opt->{"status"}
Truth table0%0/2
A
A= $opt->{"status"}
| |||||||||||||
| 21 | } | ||||||||||||
| 22 | |||||||||||||
| 23 | 34 | 1; | |||||||||||
| 24 | |||||||||||||
| 25 | =encoding utf8 | ||||||||||||
| 26 | |||||||||||||
| 27 | =head1 NAME | ||||||||||||
| 28 | |||||||||||||
| 29 | App::sdif - sdif and family tools, cdif and watchdiff | ||||||||||||
| 30 | |||||||||||||
| 31 | =head1 SYNOPSIS | ||||||||||||
| 32 | |||||||||||||
| 33 | sdif f1 f2 | ||||||||||||
| 34 | |||||||||||||
| 35 | diff -c f1 f2 | cdif | ||||||||||||
| 36 | |||||||||||||
| 37 | git diff | sdif -n | ||||||||||||
| 38 | |||||||||||||
| 39 | watchdiff df | ||||||||||||
| 40 | |||||||||||||
| 41 | =head1 DESCRIPTION | ||||||||||||
| 42 | |||||||||||||
| 43 | B<sdif-tools> is composed of B<sdif> and related tools including | ||||||||||||
| 44 | B<cdif> and B<watchdiff>. | ||||||||||||
| 45 | |||||||||||||
| 46 | B<sdif> prints diff output in side-by-side format. | ||||||||||||
| 47 | |||||||||||||
| 48 | B<cdif> adds visual effects to diff output, comparing lines word by | ||||||||||||
| 49 | word or character by character. | ||||||||||||
| 50 | |||||||||||||
| 51 | B<watchdiff> calls a command repeatedly, and prints its output with | ||||||||||||
| 52 | visual effects to emphasize the modified part. | ||||||||||||
| 53 | |||||||||||||
| 54 | See the manual of each command for details. | ||||||||||||
| 55 | |||||||||||||
| 56 | =head1 INSTALL | ||||||||||||
| 57 | |||||||||||||
| 58 | $ cpanm App::sdif | ||||||||||||
| 59 | |||||||||||||
| 60 | =head1 GIT | ||||||||||||
| 61 | |||||||||||||
| 62 | These are sample configurations for using the B<sdif> family under | ||||||||||||
| 63 | git. The B<mecab> command has to be installed to use the B<--mecab> | ||||||||||||
| 64 | option. | ||||||||||||
| 65 | |||||||||||||
| 66 | ~/.gitconfig | ||||||||||||
| 67 | [pager] | ||||||||||||
| 68 | log = sdif | less | ||||||||||||
| 69 | show = sdif | less | ||||||||||||
| 70 | diff = sdif | less | ||||||||||||
| 71 | |||||||||||||
| 72 | ~/.sdifrc | ||||||||||||
| 73 | option default -n --margin=4 | ||||||||||||
| 74 | |||||||||||||
| 75 | ~/.cdifrc | ||||||||||||
| 76 | option default --mecab | ||||||||||||
| 77 | |||||||||||||
| 78 | ~/.profile | ||||||||||||
| 79 | export LESS="-cR" | ||||||||||||
| 80 | export LESSANSIENDCHARS="mK" | ||||||||||||
| 81 | |||||||||||||
| 82 | Everything can be written in F<~/.gitconfig> instead: | ||||||||||||
| 83 | |||||||||||||
| 84 | [pager] | ||||||||||||
| 85 | log = sdif -n --margin=4 --mecab | env LESSANSIENDCHARS=mK less -cR | ||||||||||||
| 86 | show = sdif -n --margin=4 --mecab | env LESSANSIENDCHARS=mK less -cR | ||||||||||||
| 87 | diff = sdif -n --margin=4 --mecab | env LESSANSIENDCHARS=mK less -cR | ||||||||||||
| 88 | |||||||||||||
| 89 | =begin html | ||||||||||||
| 90 | |||||||||||||
| 91 | <p><img width="750" src="https://raw.githubusercontent.com/kaz-utashiro/sdif-tools/master/docs/images/git.jpg"></p> | ||||||||||||
| 92 | |||||||||||||
| 93 | =end html | ||||||||||||
| 94 | |||||||||||||
| 95 | =head1 SEE ALSO | ||||||||||||
| 96 | |||||||||||||
| 97 | L<sdif>, L<cdif>, L<watchdiff> | ||||||||||||
| 98 | |||||||||||||
| 99 | L<Getopt::EX> | ||||||||||||
| 100 | |||||||||||||
| 101 | =head1 AUTHOR | ||||||||||||
| 102 | |||||||||||||
| 103 | Kazumasa Utashiro | ||||||||||||
| 104 | |||||||||||||
| 105 | =head1 LICENSE | ||||||||||||
| 106 | |||||||||||||
| 107 | Copyright 1992- Kazumasa Utashiro. | ||||||||||||
| 108 | |||||||||||||
| 109 | These commands and libraries are free software; you can redistribute | ||||||||||||
| 110 | it and/or modify it under the same terms as Perl itself. | ||||||||||||
| 111 | |||||||||||||
| 112 | =cut | ||||||||||||
| 113 | |||||||||||||
| 114 | # LocalWords: sdif cdif watchdiff diff CPANM cpanm Kaz Utashiro | ||||||||||||