blib/lib/Statocles/App/Static.pm

filter: Statementstmt 95.0% 19 / 20 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 100% 1 / 1 totaltotal 92.5% 25 / 27 CC 2 SCAR 3.5
CC
2
Cov
91%
pages
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.4
« blib/lib/Statocles/File.pm ↑ Summary blib/lib/Statocles/Types.pm »
1 package Statocles::App::Static;
2 1 our $VERSION = '0.099';
3 # ABSTRACT: (DEPRECATED) Manage static files like CSS, JS, images, and other untemplated content
4  
5 2 ▶use Statocles::Base 'Class';
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶use Statocles::Page::File;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 ▶use Statocles::Util qw( derp );
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 with 'Statocles::App';
9  
10 #pod =attr store
11 #pod
12 #pod The L<store|Statocles::Store> containing this app's files. Required.
13 #pod
14 #pod =cut
15  
16 1 has store => (
17 is => 'ro',
18 isa => StoreType,
19 required => 1,
20 coerce => StoreType->coercion,
21 );
22  
23 #pod =method pages
24 #pod
25 #pod my @pages = $app->pages;
26 #pod
27 #pod Get the L<page objects|Statocles::Page> for this app.
28 #pod
29 #pod =cut
30  
31 1 ▶sub pages {
Subroutine pages: called CC=2 SCAR=7.1
Pod documented
32 1 my ( $self ) = @_;
33  
34 1 derp qq{Statocles::App::Static has been replaced by Statocles::App::Basic and will be removed in 2.0. Change the app class to "Statocles::App::Basic" to silence this message.};
35  
36 1 my @pages;
37 1 my $iter = $self->store->iterator;
38 1 ▶ FILE: while ( my $obj = $iter->() ) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $obj = &$iter()) 0 1 1
39 0 push @pages, Statocles::Page::File->new(
40 path => $obj->path.'',
41 file_path => $self->store->path->child( $obj->path ),
42 );
43 }
44  
45 1 return @pages;
46 }
47  
48 1 1;
49  
50 __END__
« blib/lib/Statocles/File.pm ↑ Summary blib/lib/Statocles/Types.pm »