1 package THSelenium::Test::Controller::Root;
3 use namespace::autoclean;
5 BEGIN { extends 'Catalyst::Controller' }
8 # Sets the actions in this controller to be registered with no prefix
9 # so they function identically to actions created in MyApp.pm
11 __PACKAGE__->config(namespace => '');
15 THSelenium::Test::Controller::Root - Root Controller for THSelenium::Test
19 [enter your description here]
29 sub index :Path :Args(0) {
31 $c->stash->{template} = 'index.tt';
34 sub basic :Path('/basic') :Args(0) {
35 my ( $self, $c ) = @_;
36 $c->stash->{template} = 'basic.tt';
39 sub echo :Path('/echo') :Args(0) {
41 if(my $query = $c->req->params->{query}) {
42 $c->stash->{query} = $query;
44 $c->stash->{template} = 'echo.tt';
49 Standard 404 error page
54 my ( $self, $c ) = @_;
55 $c->response->body( 'Page not found' );
56 $c->response->status(404);
61 Attempt to render a view, if needed.
65 sub end : ActionClass('RenderView') {}
73 This library is free software. You can redistribute it and/or modify
74 it under the same terms as Perl itself.
78 __PACKAGE__->meta->make_immutable;