tutorial/lib/MyApp/Controller/Root.pm

filter: Statementstmt 86.3% 19 / 22 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 88.8% 8 / 9 Podpod 100% 3 / 3 totaltotal 88.2% 30 / 34 CC 1 SCAR 1.1
CC
1
Cov
86%
default
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
« example/lib/MyApp/Controller/Root.pm ↑ Summary blib/lib/CatalystX/ExtJS.pm »
1 #
2 # This file is part of CatalystX-ExtJS
3 #
4 # This software is Copyright (c) 2011 by Moritz Onken.
5 #
6 # This is free software, licensed under:
7 #
8 # The (three-clause) BSD License
9 #
10 package MyApp::Controller::Root;
11 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 1 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 1 ▶BEGIN { extends 'Catalyst::Controller' }
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 #
17 # Sets the actions in this controller to be registered with no prefix
18 # so they function identically to actions created in MyApp.pm
19 #
20 1 __PACKAGE__->config(namespace => '');
21  
22 =head1 NAME
23  
24 MyApp::Controller::Root - Root Controller for MyApp
25  
26 =head1 DESCRIPTION
27  
28 [enter your description here]
29  
30 =head1 METHODS
31  
32 =head2 index
33  
34 The root page (/)
35  
36 =cut
37  
38 1 ▶sub index :Path :Args(0) { }
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine index: called CC=1 SCAR=0.0
Pod documented
39  
40 =head2 default
41  
42 Standard 404 error page
43  
44 =cut
45  
46 0 ▶sub default :Path {
Subroutine default: not called CC=1 SCAR=6.9
Pod documented
47 0 my ( $self, $c ) = @_;
48 0 $c->response->body( 'Page not found' );
49 0 $c->response->status(404);
50 1 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
51  
52 =head2 end
53  
54 Attempt to render a view, if needed.
55  
56 =cut
57  
58 1 ▶sub end : ActionClass('RenderView') {}
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine end: called CC=1 SCAR=0.0
Pod documented
59  
60 =head1 AUTHOR
61  
62 Catalyst developer
63  
64 =head1 LICENSE
65  
66 This library is free software. You can redistribute it and/or modify
67 it under the same terms as Perl itself.
68  
69 =cut
70  
71 1 __PACKAGE__->meta->make_immutable;
72  
73 1 1;
« example/lib/MyApp/Controller/Root.pm ↑ Summary blib/lib/CatalystX/ExtJS.pm »