| 1 | package Bootylicious::ArticleByTagIterator; | ||||||||||
| 2 | |||||||||||
| 3 | 2 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 2 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 2 | ▶ | use base 'Bootylicious::Decorator'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 2 | __PACKAGE__->attr('tag'); | |||||||||
| 9 | |||||||||||
| 10 | 2 | ▶ | use Bootylicious::IteratorSearchable; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | |||||||||||
| 12 | sub new { | ||||||||||
| 13 | 4 | ▶ | my $self = shift->SUPER::new(@_); | ||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 14 | |||||||||||
| 15 | 4 | return $self->build; | |||||||||
| 16 | } | ||||||||||
| 17 | |||||||||||
| 18 | sub build { | ||||||||||
| 19 | 4 | ▶ | my $self = shift; | ||||||||
|
Subroutine
build: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 20 | |||||||||||
| 21 | 4 | my $tag = $self->tag; | |||||||||
| 22 | |||||||||||
| 23 | return Bootylicious::IteratorSearchable->new($self->object)->find_all( | ||||||||||
| 24 | sub { | ||||||||||
| 25 | 8 | ▶ | my ($iterator, $elem) = @_; | ||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=6.9
| |||||||||||
| 26 | |||||||||||
| 27 | 8 | ▶ | return unless scalar grep { $_ eq $tag } @{$elem->tags}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 28 | |||||||||||
| 29 | 4 | return $elem; | |||||||||
| 30 | } | ||||||||||
| 31 | 4 | ); | |||||||||
| 32 | } | ||||||||||
| 33 | |||||||||||
| 34 | 2 | 1; | |||||||||