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 1     1   709 use 5.010;
  1         3  
4 1     1   8 use strict;
  1         4  
  1         29  
5 1     1   7 use warnings;
  1         1  
  1         34  
6              
7 1     1   6 use Moose;
  1         2  
  1         9  
8             extends 'App::AutoCRUD::Controller';
9 1     1   7514 use namespace::clean -except => 'meta';
  1         2  
  1         13  
10              
11             sub serve {
12 1     1 1 2 my ($self) = @_;
13              
14 1         31 $self->context->set_template("home.tt");
15              
16 1         6 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