Move test app
[catagits/Catalyst-Authentication-Store-LDAP.git] / t / lib / Test-Session-Broken / lib / Test / LDAP / Controller / Root.pm
CommitLineData
ecd7abea 1package Test::LDAP::Controller::Root;
2use Moose;
3use namespace::autoclean;
4
5BEGIN { extends 'Catalyst::Controller' }
6
7#
8# Sets the actions in this controller to be registered with no prefix
9# so they function identically to actions created in MyApp.pm
10#
11__PACKAGE__->config(namespace => '');
12
13=head1 NAME
14
15Test::LDAP::Controller::Root - Root Controller for Test::LDAP
16
17=head1 DESCRIPTION
18
19[enter your description here]
20
21=head1 METHODS
22
23=head2 itndex
24
25The root page (/)
26
27=cut
28
29sub index :Path :Args(0) {
30 my ( $self, $c ) = @_;
2148a3cd 31
32 $c->res->body("Index");
ecd7abea 33}
34
35=head2 default
36
37Standard 404 error page
38
39=cut
40
41sub default :Path {
42 my ( $self, $c ) = @_;
43
2148a3cd 44 $c->res->body("Not found");
ecd7abea 45 $c->res->status(404);
46}
47
48=head2 end
49
50Attempt to render a view, if needed.
51
52=cut
53
54sub end : ActionClass('RenderView') {
55 my ($self, $c) = @_;
56 my $errors = scalar @{$c->error};
57
2148a3cd 58 if ($errors) {
59 $c->res->body("Internal error");
60 $c->res->status("500");
ecd7abea 61 $c->clear_errors;
62 }
63}
64
65=head1 AUTHOR
66
67root
68
69=head1 LICENSE
70
71This library is free software. You can redistribute it and/or modify
72it under the same terms as Perl itself.
73
74=cut
75
76__PACKAGE__->meta->make_immutable;
77
781;