| 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; | |