line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
5
|
|
|
5
|
|
162
|
use 5.010001; |
|
5
|
|
|
|
|
29
|
|
2
|
5
|
|
|
5
|
|
94
|
use strict; |
|
5
|
|
|
|
|
16
|
|
|
5
|
|
|
|
|
168
|
|
3
|
5
|
|
|
5
|
|
33
|
use warnings; |
|
5
|
|
|
|
|
19
|
|
|
5
|
|
|
|
|
464
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Story::Interact::PageSource::Waterfall; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:TOBYINK'; |
8
|
|
|
|
|
|
|
our $VERSION = '0.001013'; |
9
|
|
|
|
|
|
|
|
10
|
5
|
|
|
5
|
|
45
|
use Moo; |
|
5
|
|
|
|
|
22
|
|
|
5
|
|
|
|
|
34
|
|
11
|
5
|
|
|
5
|
|
1890
|
use Types::Common -types; |
|
5
|
|
|
|
|
18
|
|
|
5
|
|
|
|
|
47
|
|
12
|
5
|
|
|
5
|
|
80843
|
use Types::Path::Tiny -types; |
|
5
|
|
|
|
|
15
|
|
|
5
|
|
|
|
|
44
|
|
13
|
5
|
|
|
5
|
|
6883
|
use List::Util qw( uniqstr ); |
|
5
|
|
|
|
|
16
|
|
|
5
|
|
|
|
|
514
|
|
14
|
5
|
|
|
5
|
|
42
|
use namespace::clean; |
|
5
|
|
|
|
|
18
|
|
|
5
|
|
|
|
|
52
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
with 'Story::Interact::PageSource'; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
has 'sources' => ( |
19
|
|
|
|
|
|
|
is => 'ro', |
20
|
|
|
|
|
|
|
isa => ArrayRef->of( ConsumerOf->of( 'Story::Interact::PageSource' ) ), |
21
|
|
|
|
|
|
|
required => 1, |
22
|
|
|
|
|
|
|
); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub get_source_code { |
25
|
9
|
|
|
9
|
0
|
64
|
my ( $self, $page_id ) = @_; |
26
|
9
|
|
|
|
|
20
|
for my $source ( @{ $self->sources } ) { |
|
9
|
|
|
|
|
29
|
|
27
|
16
|
|
|
|
|
51
|
my $code = $source->get_source_code( $page_id ); |
28
|
16
|
100
|
|
|
|
2814
|
return $code if defined $code; |
29
|
|
|
|
|
|
|
} |
30
|
1
|
|
|
|
|
38
|
return; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub all_page_ids { |
34
|
0
|
|
|
0
|
0
|
|
my ( $self ) = @_; |
35
|
0
|
|
|
|
|
|
return uniqstr( map $_->all_page_ids, @{ $self->sources } ); |
|
0
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; |