blib/lib/Bootylicious/CommentIteratorLoader.pm

filter: Statementstmt 100% 19 / 19 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 1 totaltotal 96.0% 24 / 25 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/Bootylicious/PageIteratorLoader.pm ↑ Summary blib/lib/Bootylicious.pm »
1 package Bootylicious::CommentIteratorLoader;
2  
3 10 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 10 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 10 ▶use base 'Bootylicious::FileIteratorLoader';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 14 ▶__PACKAGE__->attr(filter => sub {qr/\.comment-(\d+)$/});
Subroutine __ANON__: called CC=1 SCAR=0.0
9 10 __PACKAGE__->attr(element_class => 'Bootylicious::Comment');
10  
11 sub load {
12 14 ▶ my $iterator = shift->SUPER::load(@_);
Subroutine load: called CC=1 SCAR=0.0
Pod undocumented
13  
14 $iterator->elements(
15 16 [ sort { $a->created->epoch <=> $b->created->epoch }
16 14 @{$iterator->elements}
17 ]
18 );
19 14 $iterator->rewind;
20  
21 14 return $iterator;
22 }
23  
24 10 1;
« blib/lib/Bootylicious/PageIteratorLoader.pm ↑ Summary blib/lib/Bootylicious.pm »