Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marcusramberg/mojolicious-plugin-textexceptions
https://github.com/marcusramberg/mojolicious-plugin-textexceptions
Last synced: 17 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/marcusramberg/mojolicious-plugin-textexceptions
- Owner: marcusramberg
- Created: 2019-03-06T08:44:45.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-04-13T05:49:19.000Z (almost 4 years ago)
- Last Synced: 2024-12-21T11:51:29.547Z (26 days ago)
- Language: Perl
- Homepage:
- Size: 11.7 KB
- Stars: 1
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: Changes
Awesome Lists containing this project
README
# NAME
Mojolicious::Plugin::TextExceptions - Render exceptions as text in command line user agents
# SYNOPSIS
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
# DESCRIPTION
This plugin looks for curl/wget/mojo user agent and renders exceptions as text instead of html.
# METHODS
## register
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
# SEE ALSO
[Mojolicious](https://metacpan.org/pod/Mojolicious)
# COPYRIGHT AND LICENSE
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.# AUTHOR
Marcus Ramberg
# CONTRIBUTORS
Jan Henning Thorsen