| 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
| |||||||||||
| 48 | 0 | ▶ | my $callback = shift or (require Carp, Carp::croak 'Need a callback'); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 49 | ... | ||||||||||
| 50 | 0 | } #run() | |||||||||
| 51 | |||||||||||
| 52 | 1 | 1; | |||||||||
| 53 | __END__ | ||||||||||