lib/App/GitFind/Searcher.pm

filter: Statementstmt 84.2% 16 / 19 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 83.3% 5 / 6 Podpod 100% 1 / 1 totaltotal 73.3% 22 / 30 CC 3 SCAR 16.3
CC
3
Cov
70%
run
12.0
BEGIN
1.0
BEGIN
1.0
CRAP 5.1
« lib/App/GitFind/Actions.pm ↑ Summary lib/App/GitFind/Entry.pm »
1 # App::GitFind::Searcher - Search for files in a scope - abstract base class
2 package App::GitFind::Searcher;
3  
4 1 ▶use 5.010;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 our $VERSION = '0.000002';
9  
10 1 ▶use parent 'App::GitFind::Class';
Subroutine BEGIN: called CC=1 SCAR=0.0
11 #use Class::Tiny qw(TODO);
12  
13 1 ▶use App::GitFind::Base;
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 # Docs {{{1
16  
17 =head1 NAME
18  
19 App::GitFind::Searcher - Search for files in a particular scope
20  
21 =head1 SYNOPSIS
22  
23 This is an abstract base class. Subclasses search for files in
24 particular scopes.
25  
26 =cut
27  
28 # }}}1
29  
30 =head1 FUNCTIONS
31  
32 =head2 run
33  
34 Conducts a search. Usage:
35  
36 $searcher->run(sub { ... });
37  
38 The only parameter is a callback that will be invoked as:
39  
40 $callback->(TODO);
41  
42 TODO pruning, cancelling?
43  
44 =cut
45  
46 0 ▶sub run {
Subroutine run: not called CC=3 SCAR=24.8
Pod documented
47 0 ▶ my $self = shift or (require Carp, Carp::croak 'Need an instance');
Branch: 1 branch
BranchTrueFalseTotal
my $self = shift() or require Carp, Carp::croak("Need an instance") 0 0 0
48 0 ▶ my $callback = shift or (require Carp, Carp::croak 'Need a callback');
Branch: 1 branch
BranchTrueFalseTotal
my $callback = shift() or require Carp, Carp::croak("Need a callback") 0 0 0
49 ...
50 0 } #run()
51  
52 1 1;
53 __END__
« lib/App/GitFind/Actions.pm ↑ Summary lib/App/GitFind/Entry.pm »