File Coverage

blib/lib/App/AutoCRUD/Controller/Home.pm
Criterion Covered Total %
statement 17 17 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod 1 1 100.0
total 24 24 100.0


line stmt bran cond sub pod time code
1             package App::AutoCRUD::Controller::Home;
2              
3 2     2   1102 use 5.010;
  2         4  
4 2     2   7 use strict;
  2         4  
  2         35  
5 2     2   6 use warnings;
  2         1  
  2         43  
6              
7 2     2   6 use Moose;
  2         3  
  2         11  
8             extends 'App::AutoCRUD::Controller';
9 2     2   8622 use namespace::clean -except => 'meta';
  2         2  
  2         17  
10              
11             sub serve {
12 2     2 1 3 my ($self) = @_;
13              
14 2         61 $self->context->set_template("home.tt");
15              
16 2         11 return $self->app->datasources;
17             }
18              
19             1;
20              
21             __END__
22              
23             =head1 NAME
24              
25             App::AutoCRUD::Controller::Home
26              
27             =head1 DESCRIPTION
28              
29             Controller for the homepage of the AutoCRUD application.
30              
31             =head1 METHODS
32              
33             =head2 serve
34              
35             Finds the list of available datasources through the
36             L<App::AutoCRUD/datasources> method, and displays
37             that list through the C<home.tt> template in
38             L<App::View::TT> view.
39