1package TestPDV::Controller::Root; 2use Moose; 3use namespace::autoclean; 4 5BEGIN { extends 'Catalyst::Controller' } 6# 7# Sets the actions in this controller to be registered with no prefix 8# so they function identically to actions created in MyApp.pm 9# 10__PACKAGE__->config( namespace => '' ); 11 12=head1 NAME 13 14TestPDV::Controller::Root - Root Controller for TestPDV 15 16=head1 DESCRIPTION 17 18[enter your description here] 19 20=head1 METHODS 21 22=head2 index 23 24The root page (/) 25 26=cut 27 28=head2 default 29 30Standard 404 error page 31 32=cut 33 34sub form_test : Local { 35 my ( $self, $c ) = @_; 36 $c->stash( template => TestPDV->path_to( 'root', 'form_test.tt' ) ); 37 $c->form( required => ['testinput'] ); 38 39 my $result = $c->form->valid('testinput'); 40 $c->res->body($result); 41 42} 43 44=head2 end 45 46Attempt to render a view, if needed. 47 48=cut 49 50=head1 AUTHOR 51 52Devin Austin 53 54=head1 LICENSE 55 56This library is free software. You can redistribute it and/or modify 57it under the same terms as Perl itself. 58 59=cut 60 61__PACKAGE__->meta->make_immutable; 62 631; 64