The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Catalyst::View::Errors::Text - Standard HTTP Errors Responses in Plain Text.

SYNOPSIS

    package MyApp::View::Text;

    use Moose;
    extends 'Catalyst::View::Errors::Text';

    __PACKAGE__->meta->make_immutable;

DESCRIPTION

View class for generating error responses. If you want a lot of customizations you can subclass this in your application, or just use your own view.

METHODS

This view exposes the follow methods for public use or for a programmer to override to change function.

The follow field arguments are passed to this template:

lang

Defaults to "en_US". This is the language code of the error response.

message

This is a text message of the error condition

status_code

This is the HTTP Status code of the error

title

The official HTTP Status error title (Not Found, Not Authorized, etc.)

uri

The URI that generated the error. Be careful displaying this in your template since if its not properly escaped you can open yourself to HTML injection / Javascript injection attackes.

In addition any other arguments passed in ->dispatch_error / ->detach_error.

text

Should return a string suitable for Text::Template and is used to generate a plain text error response. This is used if there's no file at $APPHOME/root/http_errors_text.tmpl

CONFIGURATION

This View exposes the following configuration options

template_engine_args

Args that are used to start the Text::Template template engin

template_name

Name of the files under $APPHOME/root that is used to render an error view. Default is http_errors_text.tmpl. If this this file doesn't exist we instead use the return of "text" method for the template string.

SEE ALSO

CatalystX::Errors.

AUTHOR

CatalystX::Errors.

COPYRIGHT & LICENSE

CatalystX::Errors.