Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions share/lib/MyApp.pm.tt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ __PACKAGE__->config(
# Disable deprecated behavior needed by old applications
disable_component_resolution_regex_fallback => 1,
enable_catalyst_header => 1, # Send X-Catalyst header
abort_chain_on_error_fix => 1, # Break a chain if error occurs
);

# Start the application
Expand Down
13 changes: 12 additions & 1 deletion share/lib/MyApp/Controller/Root.pm.tt
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,22 @@ sub index :Path :Args(0) {

=head2 default

Standard 404 error page
Default handler if no action is matched

=cut

sub default :Path {
my ( $self, $c ) = @_;
$c->detach('/not_found');
}

=head2 not_found

Standard 404 error page

=cut

sub not_found: Private {
my ( $self, $c ) = @_;
$c->response->body( 'Page not found' );
$c->response->status(404);
Expand Down