| 1 | package App::GitFind; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | 2 | ▶ | use 5.010; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 2 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | 2 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||
| 7 | 2 | ▶ | use App::GitFind::Base; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||
| 9 | 2 | ▶ | use parent 'App::GitFind::Class'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 10 | 2 | ▶ | use Class::Tiny _qwc <<'EOT'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 11 | argv # the args we parse | ||||||||||||||||||||||||||||
| 12 | _expr # the expression (AST from parsing) | ||||||||||||||||||||||||||||
| 13 | _revs # the revs in the search scope, or ']]' for filesystem | ||||||||||||||||||||||||||||
| 14 | _repo # The Git::Raw::Repository of the superproject we are in | ||||||||||||||||||||||||||||
| 15 | _repotop # The working directory of _repo. Path::Class::Dir. | ||||||||||||||||||||||||||||
| 16 | _searchbase # Path::Class::Dir with respect to which results | ||||||||||||||||||||||||||||
| 17 | # are reported. | ||||||||||||||||||||||||||||
| 18 | _searcher # App::GitFind::Searcher subclass that finds entries | ||||||||||||||||||||||||||||
| 19 | _scan_submodules # If truthy, scan submodules. | ||||||||||||||||||||||||||||
| 20 | EOT | ||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||
| 22 | 2 | ▶ | use App::GitFind::Actions; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 23 | 2 | ▶ | use App::GitFind::cmdline; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 24 | 2 | ▶ | use App::GitFind::FileProcessor; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 25 | 2 | ▶ | use Getopt::Long 2.34 (); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 26 | 2 | ▶ | use Git::Raw; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 27 | 2 | ▶ | use IO::Handle; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 28 | 2 | ▶ | use Iterator::Simple qw(ichain iflatten igrep imap iter iterator); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 29 | #use Path::Class; # TODO see if we can do without Path::Class for speed | ||||||||||||||||||||||||||||
| 30 | 2 | ▶ | use App::GitFind::PathClassMicro; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||
| 32 | 2 | our $VERSION = '0.000002'; | |||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||
| 34 | # === Documentation === {{{1 | ||||||||||||||||||||||||||||
| 35 | |||||||||||||||||||||||||||||
| 36 | =head1 NAME | ||||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||
| 38 | App::GitFind - Find files anywhere in a Git repository | ||||||||||||||||||||||||||||
| 39 | |||||||||||||||||||||||||||||
| 40 | =head1 SYNOPSIS | ||||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||
| 42 | This is the implementation of the L<git-find> command (q.v.). To use it | ||||||||||||||||||||||||||||
| 43 | from Perl code: | ||||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||
| 45 | use App::GitFind; | ||||||||||||||||||||||||||||
| 46 | exit App::GitFind->new(\@ARGV)->run; | ||||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||
| 48 | =head1 SUBROUTINES/METHODS | ||||||||||||||||||||||||||||
| 49 | |||||||||||||||||||||||||||||
| 50 | =cut | ||||||||||||||||||||||||||||
| 51 | |||||||||||||||||||||||||||||
| 52 | # }}}1 | ||||||||||||||||||||||||||||
| 53 | |||||||||||||||||||||||||||||
| 54 | # Later items: | ||||||||||||||||||||||||||||
| 55 | # TODO add an option to report absolute paths instead of relative | ||||||||||||||||||||||||||||
| 56 | # TODO skip .git and .gitignored files unless -u | ||||||||||||||||||||||||||||
| 57 | # TODO optimization: if possible, add a filter function | ||||||||||||||||||||||||||||
| 58 | # (e.g., for a top-level -type filter) | ||||||||||||||||||||||||||||
| 59 | |||||||||||||||||||||||||||||
| 60 | =head2 BUILD | ||||||||||||||||||||||||||||
| 61 | |||||||||||||||||||||||||||||
| 62 | Process the arguments. Usage: | ||||||||||||||||||||||||||||
| 63 | |||||||||||||||||||||||||||||
| 64 | my $gf = App::GitFind->new(-argv => \@ARGV, -searchbase => Cwd::getcwd); | ||||||||||||||||||||||||||||
| 65 | |||||||||||||||||||||||||||||
| 66 | May modify the provided array. May C<exit()>, e.g., on C<--help>. | ||||||||||||||||||||||||||||
| 67 | |||||||||||||||||||||||||||||
| 68 | =cut | ||||||||||||||||||||||||||||
| 69 | |||||||||||||||||||||||||||||
| 70 | 1 | ▶ | sub BUILD { | ||||||||||||||||||||||||||
|
Subroutine
BUILD: called CC=10 SCAR=42.9
Pod
documented
| |||||||||||||||||||||||||||||
| 71 | 1 | my ($self, $hrArgs) = @_; | |||||||||||||||||||||||||||
| 72 | 1 | ▶ | croak "Need a -argv arrayref" unless ref $hrArgs->{argv} eq 'ARRAY'; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 73 | 1 | ▶ | croak "Need a -searchbase" unless defined $hrArgs->{searchbase}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 74 | |||||||||||||||||||||||||||||
| 75 | 1 | my $details = _process_options($hrArgs->{argv}); | |||||||||||||||||||||||||||
| 76 | |||||||||||||||||||||||||||||
| 77 | # Handle default -print | ||||||||||||||||||||||||||||
| 78 | 0 | ▶ | if(!$details->{expr}) { # Default: -print | ||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||
| 79 | 0 | $details->{expr} = App::GitFind::Actions::argdetails('print'); | |||||||||||||||||||||||||||
| 80 | |||||||||||||||||||||||||||||
| 81 | } elsif(!$details->{saw_nonprune_action}) { # With an expr: -print unless an action | ||||||||||||||||||||||||||||
| 82 | # other than -prune was given | ||||||||||||||||||||||||||||
| 83 | $details->{expr} = +{ | ||||||||||||||||||||||||||||
| 84 | 0 | AND => [ $details->{expr}, App::GitFind::Actions::argdetails('print') ] | |||||||||||||||||||||||||||
| 85 | }; | ||||||||||||||||||||||||||||
| 86 | } | ||||||||||||||||||||||||||||
| 87 | |||||||||||||||||||||||||||||
| 88 | # Add default for missing revs | ||||||||||||||||||||||||||||
| 89 | 0 | ▶ | unless($details->{revs}) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 90 | 0 | $details->{revs} = [undef]; | |||||||||||||||||||||||||||
| 91 | 0 | ▶ | $details->{saw_non_rr} ||= true; | ||||||||||||||||||||||||||
|
Condition0%0/2
$details->{"saw_non_rr"} ||= !!1
MC/DC0%0/1
$details->{"saw_non_rr"} ||= !!1
$details->{"saw_non_rr"}
Truth table0%0/2
A
A= $details->{"saw_non_rr"}
| |||||||||||||||||||||||||||||
| 92 | } | ||||||||||||||||||||||||||||
| 93 | 0 | ▶ | if(@{$details->{revs}} > 1) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 94 | 0 | require List::SomeUtils; | |||||||||||||||||||||||||||
| 95 | 0 | $details->{revs} = [List::SomeUtils::uniq(@{$details->{revs}})]; | |||||||||||||||||||||||||||
| 96 | } | ||||||||||||||||||||||||||||
| 97 | |||||||||||||||||||||||||||||
| 98 | 0 | ▶ | vlog { "Options:", ddc $details } 2; | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||
| 99 | |||||||||||||||||||||||||||||
| 100 | # Check the scope. TODO permit searching both ]] and non-]] in one run | ||||||||||||||||||||||||||||
| 101 | 0 | ▶ | if($details->{saw_rr} && $details->{saw_non_rr}) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$details->{"saw_rr"} and $details->{"saw_non_rr"}
MC/DC0%0/2
$details->{"saw_rr"} and $details->{"saw_non_rr"}
$details->{"saw_rr"}
$details->{"saw_non_rr"}
Truth table0%0/3
A and B
A= $details->{"saw_rr"}B= $details->{"saw_non_rr"}
| |||||||||||||||||||||||||||||
| 102 | 0 | die "I don't know how to search both ']]' and a Git rev at once." | |||||||||||||||||||||||||||
| 103 | } | ||||||||||||||||||||||||||||
| 104 | |||||||||||||||||||||||||||||
| 105 | # Copy information into our instance fields | ||||||||||||||||||||||||||||
| 106 | 0 | $self->_expr($details->{expr}); | |||||||||||||||||||||||||||
| 107 | 0 | $self->_revs($details->{revs}); | |||||||||||||||||||||||||||
| 108 | $self->_searchbase( | ||||||||||||||||||||||||||||
| 109 | App::GitFind::PathClassMicro::Dir->new($hrArgs->{searchbase}) | ||||||||||||||||||||||||||||
| 110 | 0 | ); | |||||||||||||||||||||||||||
| 111 | |||||||||||||||||||||||||||||
| 112 | 0 | $self->_find_repo; | |||||||||||||||||||||||||||
| 113 | |||||||||||||||||||||||||||||
| 114 | } #BUILD() | ||||||||||||||||||||||||||||
| 115 | |||||||||||||||||||||||||||||
| 116 | # Initialize _repo and _repotop. Dies on error. | ||||||||||||||||||||||||||||
| 117 | 0 | ▶ | sub _find_repo { | ||||||||||||||||||||||||||
|
Subroutine
_find_repo: not called CC=4 SCAR=30.0
| |||||||||||||||||||||||||||||
| 118 | 0 | my $self = shift; | |||||||||||||||||||||||||||
| 119 | # Find the repo we're in. If we're in a submodule, that will be the | ||||||||||||||||||||||||||||
| 120 | # repo of that submodule. | ||||||||||||||||||||||||||||
| 121 | 0 | my $repo = eval { Git::Raw::Repository->discover('.'); }; | |||||||||||||||||||||||||||
| 122 | 0 | ▶ | die "Not in a Git repository: $@\n" if $@; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 123 | 0 | $self->_repo($repo); | |||||||||||||||||||||||||||
| 124 | |||||||||||||||||||||||||||||
| 125 | 0 | $self->_repotop( App::GitFind::PathClassMicro::Dir->new($self->_repo->workdir) ); | |||||||||||||||||||||||||||
| 126 | # $repo->path is .git/ | ||||||||||||||||||||||||||||
| 127 | 0 | ▶ | vlog { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||
| 128 | 0 | "Repository:", $self->_repo->path, | |||||||||||||||||||||||||||
| 129 | "\nWorking dir:", $self->_repotop, | ||||||||||||||||||||||||||||
| 130 | "\nSearch base:", $self->_searchbase, | ||||||||||||||||||||||||||||
| 131 | 0 | }; | |||||||||||||||||||||||||||
| 132 | |||||||||||||||||||||||||||||
| 133 | # Are we in a submodule? If so, move outward to the parent | ||||||||||||||||||||||||||||
| 134 | 0 | ▶ | if($self->_repo->path =~ qr{^(.+?[\\\/]\.git)[\\\/]modules[\\\/]}) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 135 | 0 | my $parent_path = $1; | |||||||||||||||||||||||||||
| 136 | 0 | $repo = eval { Git::Raw::Repository->open($parent_path); }; | |||||||||||||||||||||||||||
| 137 | 0 | ▶ | die "Could not open parent Git repository in $parent_path: $@\n" if $@; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 138 | 0 | $self->_repo($repo); | |||||||||||||||||||||||||||
| 139 | 0 | ▶ | vlog { 'Moved to outer repo', $parent_path }; | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||
| 140 | } | ||||||||||||||||||||||||||||
| 141 | } #_find_repo() | ||||||||||||||||||||||||||||
| 142 | |||||||||||||||||||||||||||||
| 143 | =head2 run | ||||||||||||||||||||||||||||
| 144 | |||||||||||||||||||||||||||||
| 145 | Does the work. Call as C<< exit($obj->run()) >>. Returns a shell exit code. | ||||||||||||||||||||||||||||
| 146 | |||||||||||||||||||||||||||||
| 147 | =cut | ||||||||||||||||||||||||||||
| 148 | |||||||||||||||||||||||||||||
| 149 | 0 | ▶ | sub run { | ||||||||||||||||||||||||||
|
Subroutine
run: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||
| 150 | 0 | my $self = shift; | |||||||||||||||||||||||||||
| 151 | 0 | my $runner = App::GitFind::FileProcessor->new(-expr => $self->_expr); | |||||||||||||||||||||||||||
| 152 | 0 | my $callback = $runner->callback($VERBOSE>=3); | |||||||||||||||||||||||||||
| 153 | |||||||||||||||||||||||||||||
| 154 | 0 | ▶ | if($VERBOSE) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 155 | 0 | STDOUT->autoflush(true); | |||||||||||||||||||||||||||
| 156 | 0 | STDERR->autoflush(true); | |||||||||||||||||||||||||||
| 157 | } | ||||||||||||||||||||||||||||
| 158 | |||||||||||||||||||||||||||||
| 159 | 0 | for my $rev (@{$self->_revs}) { | |||||||||||||||||||||||||||
| 160 | 0 | my $searcher = $self->_make_searcher($rev, $self->_repo); | |||||||||||||||||||||||||||
| 161 | # TODO? deduplicate? | ||||||||||||||||||||||||||||
| 162 | 0 | $searcher->run($callback); | |||||||||||||||||||||||||||
| 163 | # TODO? early stop? | ||||||||||||||||||||||||||||
| 164 | } | ||||||||||||||||||||||||||||
| 165 | |||||||||||||||||||||||||||||
| 166 | 0 | return 0; # TODO? return 1 if any -exec failed? | |||||||||||||||||||||||||||
| 167 | } #run() | ||||||||||||||||||||||||||||
| 168 | |||||||||||||||||||||||||||||
| 169 | =head1 INTERNALS | ||||||||||||||||||||||||||||
| 170 | |||||||||||||||||||||||||||||
| 171 | =head2 _make_searcher | ||||||||||||||||||||||||||||
| 172 | |||||||||||||||||||||||||||||
| 173 | Create an iterator for the entries to be processed. Returns an | ||||||||||||||||||||||||||||
| 174 | L<App::GitFind::Searcher>. Usage: | ||||||||||||||||||||||||||||
| 175 | |||||||||||||||||||||||||||||
| 176 | my $searcher = $self->_make_searcher('rev', -in => $repo); | ||||||||||||||||||||||||||||
| 177 | |||||||||||||||||||||||||||||
| 178 | =cut | ||||||||||||||||||||||||||||
| 179 | |||||||||||||||||||||||||||||
| 180 | 0 | ▶ | sub _make_searcher { | ||||||||||||||||||||||||||
|
Subroutine
_make_searcher: not called CC=3 SCAR=24.8
| |||||||||||||||||||||||||||||
| 181 | 0 | my ($self, %args) = getparameters('self', [qw(rev in)], @_); | |||||||||||||||||||||||||||
| 182 | 0 | my $rev = $args{rev}; | |||||||||||||||||||||||||||
| 183 | 0 | my $repo = $args{in}; | |||||||||||||||||||||||||||
| 184 | |||||||||||||||||||||||||||||
| 185 | # TODO find files in scope $self->_revs, repo $repo | ||||||||||||||||||||||||||||
| 186 | |||||||||||||||||||||||||||||
| 187 | 0 | ▶ | if(!defined $rev) { # The index of the current repo | ||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||
| 188 | 0 | require App::GitFind::Searcher::Git; | |||||||||||||||||||||||||||
| 189 | 0 | return App::GitFind::Searcher::Git->new( | |||||||||||||||||||||||||||
| 190 | -repo => $repo, | ||||||||||||||||||||||||||||
| 191 | -searchbase=>$self->_searchbase | ||||||||||||||||||||||||||||
| 192 | ); | ||||||||||||||||||||||||||||
| 193 | |||||||||||||||||||||||||||||
| 194 | } elsif($rev eq ']]') { # The current working directory | ||||||||||||||||||||||||||||
| 195 | 0 | require App::GitFind::Searcher::FileSystem; | |||||||||||||||||||||||||||
| 196 | 0 | return App::GitFind::Searcher::FileSystem->new( | |||||||||||||||||||||||||||
| 197 | -repo => $repo, | ||||||||||||||||||||||||||||
| 198 | -searchbase=>$self->_searchbase | ||||||||||||||||||||||||||||
| 199 | ); | ||||||||||||||||||||||||||||
| 200 | |||||||||||||||||||||||||||||
| 201 | } else { | ||||||||||||||||||||||||||||
| 202 | 0 | die "I don't yet know how to search through rev $_"; | |||||||||||||||||||||||||||
| 203 | } | ||||||||||||||||||||||||||||
| 204 | |||||||||||||||||||||||||||||
| 205 | } #_make_searcher | ||||||||||||||||||||||||||||
| 206 | |||||||||||||||||||||||||||||
| 207 | =head2 _process_options | ||||||||||||||||||||||||||||
| 208 | |||||||||||||||||||||||||||||
| 209 | Process the options and return a hashref. Any remaining arguments are | ||||||||||||||||||||||||||||
| 210 | stored under key C<_>. | ||||||||||||||||||||||||||||
| 211 | |||||||||||||||||||||||||||||
| 212 | =cut | ||||||||||||||||||||||||||||
| 213 | |||||||||||||||||||||||||||||
| 214 | 1 | ▶ | sub _process_options { | ||||||||||||||||||||||||||
|
Subroutine
_process_options: called CC=12 SCAR=35.7
| |||||||||||||||||||||||||||||
| 215 | 1 | ▶ | my $lrArgv = shift // []; | ||||||||||||||||||||||||||
|
Condition50%1/2
shift() // []
MC/DC0%0/1
shift() // []
shift()
Truth table50%1/2
A
A= shift()
| |||||||||||||||||||||||||||||
| 216 | 1 | my $hrOpts; | |||||||||||||||||||||||||||
| 217 | 1 | ▶ | local *have = sub { $hrOpts->{switches}->{$_[0] // $_} }; | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=8.1
Condition33%1/3
$_[0] // $_
MC/DC0%0/2
$_[0] // $_
$_[0]
$_
Truth table33%1/3
A // B
A= $_[0]B= $_
| |||||||||||||||||||||||||||||
| 218 | |||||||||||||||||||||||||||||
| 219 | 1 | ▶ | $hrOpts = App::GitFind::cmdline::Parse($lrArgv) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 220 | or die 'Could not parse options successfully'; | ||||||||||||||||||||||||||||
| 221 | |||||||||||||||||||||||||||||
| 222 | 1 | ▶ | $VERBOSE = scalar @{$hrOpts->{switches}->{v} // []}; | ||||||||||||||||||||||||||
|
Condition50%1/2
$hrOpts->{"switches"}{"v"} // []
MC/DC0%0/1
$hrOpts->{"switches"}{"v"} // []
$hrOpts->{"switches"}{"v"}
Truth table50%1/2
A
A= $hrOpts->{"switches"}{"v"}
| |||||||||||||||||||||||||||||
| 223 | 1 | ▶ | $QUIET = scalar @{$hrOpts->{switches}->{q} // []}; | ||||||||||||||||||||||||||
|
Condition50%1/2
$hrOpts->{"switches"}{"q"} // []
MC/DC0%0/1
$hrOpts->{"switches"}{"q"} // []
$hrOpts->{"switches"}{"q"}
Truth table50%1/2
A
A= $hrOpts->{"switches"}{"q"}
| |||||||||||||||||||||||||||||
| 224 | |||||||||||||||||||||||||||||
| 225 | 1 | ▶ | Getopt::Long::HelpMessage(-exitval => 0, -verbose => 2) if have('man'); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 226 | 1 | ▶ | Getopt::Long::HelpMessage(-exitval => 0, -verbose => 1) | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
have("h") or have("help")
MC/DC0%0/2
have("h") or have("help")
have("h")
have("help")
Truth table33%1/3
A or B
A= have("h")B= have("help")
| |||||||||||||||||||||||||||||
| 227 | if have('h') || have('help'); | ||||||||||||||||||||||||||||
| 228 | 0 | ▶ | Getopt::Long::HelpMessage(-exitval => 0) if have('?') || have('usage'); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
have("?") or have("usage")
MC/DC0%0/2
have("?") or have("usage")
have("?")
have("usage")
Truth table0%0/3
A or B
A= have("?")B= have("usage")
| |||||||||||||||||||||||||||||
| 229 | 0 | ▶ | Getopt::Long::VersionMessage(-exitval => 0) if have('V')||have('version'); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
have("V") or have("version")
MC/DC0%0/2
have("V") or have("version")
have("V")
have("version")
Truth table0%0/3
A or B
A= have("V")B= have("version")
| |||||||||||||||||||||||||||||
| 230 | |||||||||||||||||||||||||||||
| 231 | 0 | return $hrOpts; | |||||||||||||||||||||||||||
| 232 | } #_process_options | ||||||||||||||||||||||||||||
| 233 | |||||||||||||||||||||||||||||
| 234 | 2 | 1; # End of App::GitFind | |||||||||||||||||||||||||||
| 235 | __END__ | ||||||||||||||||||||||||||||