| 1 | package WWW::Picnic::Result::Suggestions; | ||||||||||||||||||||
| 2 | # ABSTRACT: Collection of Picnic search suggestions | ||||||||||||||||||||
| 3 | 2 | our $VERSION = '0.101'; | |||||||||||||||||||
| 4 | 2 | ▶ | use Moo; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | |||||||||||||||||||||
| 6 | 2 | extends 'WWW::Picnic::Result'; | |||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | |||||||||||||||||||||
| 9 | has suggestions => ( | ||||||||||||||||||||
| 10 | is => 'ro', | ||||||||||||||||||||
| 11 | lazy => 1, | ||||||||||||||||||||
| 12 | 1 | ▶ | default => sub { | ||||||||||||||||||
|
Subroutine
__ANON__: called CC=3 SCAR=13.1
| |||||||||||||||||||||
| 13 | 1 | my $self = shift; | |||||||||||||||||||
| 14 | 1 | my $raw = $self->raw; | |||||||||||||||||||
| 15 | 1 | ▶ | return ref $raw eq 'ARRAY' ? $raw : ( $raw->{suggestions} || [] ); | ||||||||||||||||||
|
Branch: 1 branch
Condition0%0/2
$raw->{"suggestions"} or []
MC/DC0%0/1
$raw->{"suggestions"} or []
$raw->{"suggestions"}
Truth table0%0/2
A
A= $raw->{"suggestions"}
| |||||||||||||||||||||
| 16 | }, | ||||||||||||||||||||
| 17 | 2 | ); | |||||||||||||||||||
| 18 | |||||||||||||||||||||
| 19 | |||||||||||||||||||||
| 20 | 1 | ▶ | sub all_suggestions { | ||||||||||||||||||
|
Subroutine
all_suggestions: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||
| 21 | 1 | my ( $self ) = @_; | |||||||||||||||||||
| 22 | 1 | return @{ $self->suggestions }; | |||||||||||||||||||
| 23 | } | ||||||||||||||||||||
| 24 | |||||||||||||||||||||
| 25 | |||||||||||||||||||||
| 26 | 1 | ▶ | sub total_count { | ||||||||||||||||||
|
Subroutine
total_count: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||
| 27 | 1 | my ( $self ) = @_; | |||||||||||||||||||
| 28 | 1 | return scalar @{ $self->suggestions }; | |||||||||||||||||||
| 29 | } | ||||||||||||||||||||
| 30 | |||||||||||||||||||||
| 31 | |||||||||||||||||||||
| 32 | 2 | 1; | |||||||||||||||||||
| 33 | |||||||||||||||||||||
| 34 | __END__ | ||||||||||||||||||||