File Coverage

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


line stmt bran cond sub pod time code
1             package App::AutoCRUD::Controller::Home;
2              
3 1     1   558 use 5.010;
  1         3  
  1         31  
4 1     1   3 use strict;
  1         1  
  1         27  
5 1     1   5 use warnings;
  1         1  
  1         24  
6              
7 1     1   4 use Moose;
  1         1  
  1         6  
8             extends 'App::AutoCRUD::Controller';
9 1     1   5253 use namespace::clean -except => 'meta';
  1         2  
  1         8  
10              
11             sub serve {
12 1     1 1 1 my ($self) = @_;
13              
14 1         39 $self->context->set_template("home.tt");
15              
16 1         9 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