| 1 | package Search::OpenSearch; | ||||||||||
| 2 | |||||||||||
| 3 | 2 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 2 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 2 | ▶ | use Carp; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 2 | ▶ | use Class::Load; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 2 | our $VERSION = '0.409'; | |||||||||
| 9 | |||||||||||
| 10 | 0 | ▶ | sub engine { | ||||||||
|
Subroutine
engine: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||
| 11 | 0 | my $class = shift; | |||||||||
| 12 | 0 | my %args = @_; | |||||||||
| 13 | 0 | ▶ | my $type = delete $args{type} or confess "type required"; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 14 | 0 | ▶ | my $engine_class | ||||||||
|
Branch: 1 branch
| |||||||||||
| 15 | = $type =~ s/^\+// | ||||||||||
| 16 | ? $type | ||||||||||
| 17 | : 'Search::OpenSearch::Engine::' . $type; | ||||||||||
| 18 | 0 | Class::Load::load_class($engine_class); | |||||||||
| 19 | 0 | return $engine_class->new(%args); | |||||||||
| 20 | } | ||||||||||
| 21 | |||||||||||
| 22 | 2 | 1; | |||||||||
| 23 | |||||||||||
| 24 | __END__ | ||||||||||