line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Bootylicious::PageIteratorFinder; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
26
|
use strict; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
88
|
|
4
|
4
|
|
|
4
|
|
17
|
use warnings; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
82
|
|
5
|
|
|
|
|
|
|
|
6
|
4
|
|
|
4
|
|
17
|
use base 'Mojo::Base'; |
|
4
|
|
|
|
|
13
|
|
|
4
|
|
|
|
|
237
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
__PACKAGE__->attr('iterator'); |
9
|
|
|
|
|
|
|
|
10
|
4
|
|
|
4
|
|
26
|
use Bootylicious::IteratorSearchable; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
22
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub new { |
13
|
3
|
|
|
3
|
1
|
17
|
my $self = shift->SUPER::new(@_); |
14
|
|
|
|
|
|
|
|
15
|
3
|
50
|
|
|
|
29
|
Carp::croak q/Iterator is a required parameter/ unless $self->iterator; |
16
|
|
|
|
|
|
|
|
17
|
3
|
|
|
|
|
28
|
return $self; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub find { |
21
|
3
|
|
|
3
|
0
|
8
|
my $self = shift; |
22
|
3
|
|
|
|
|
10
|
my ($name) = @_; |
23
|
|
|
|
|
|
|
|
24
|
3
|
|
|
|
|
10
|
my $iterator = Bootylicious::IteratorSearchable->new($self->iterator); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
return $iterator->find_first( |
27
|
|
|
|
|
|
|
sub { |
28
|
3
|
|
|
3
|
|
15
|
my ($iterator, $elem) = @_; |
29
|
|
|
|
|
|
|
|
30
|
3
|
100
|
|
|
|
12
|
return unless $elem->name eq $name; |
31
|
|
|
|
|
|
|
|
32
|
1
|
|
|
|
|
6
|
return $elem; |
33
|
|
|
|
|
|
|
} |
34
|
3
|
|
|
|
|
28
|
); |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |