Mojolicious::Plugin::TextExceptions - Render exceptions as text in command line user agents
use Mojolicious::Lite; # Only enable this plugin when running tests plugin 'TextExceptions' if $ENV{HARNESS_ACTIVE}; # Only enable this plugin when developing plugin 'TextExceptions' if app->mode eq 'development'; # Always enabling the plugin can leak sensitive information # to the end user plugin 'TextExceptions'; plugin 'TextExceptions', ua_re => qr{^LWP}; # Override the default regex for user agent
This plugin looks for curl/wget/mojo user agent and renders exceptions as text instead of html.
Sets up a before_render hook to look for text based user agents and render exceptions as text.
Currently supports Mojo::UserAgent, curl and wget
Mojolicious
Copyright (C) 2019, Marcus Ramberg
This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0.
Marcus Ramberg <mramberg@cpan.org>
Jan Henning Thorsen <jhthorsen@cpan.org>
To install Mojolicious::Plugin::TextExceptions, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojolicious::Plugin::TextExceptions
CPAN shell
perl -MCPAN -e shell install Mojolicious::Plugin::TextExceptions
For more information on module installation, please visit the detailed CPAN module installation guide.