aboutsummaryrefslogtreecommitdiffstats
path: root/cpanfile
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2017-08-29 09:33:20 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2017-08-29 16:17:34 +0100
commit68111f484bf27f03ce023497fdc5868c2b724ffb (patch)
treef8ffd8de32b1fce7925ee9759d6c808e8bcf3aca /cpanfile
parent66bd45b66911860dd2d59e5a6e38586a1641a2d7 (diff)
Add debug toolbar middleware.
If debug is enabled, using the CATALYST_DEBUG/FIXMYSTREET_APP_DEBUG environment variables, add a debug toolbar to the output, including request/response details and a database query log. This uses Plack middleware, so works by switching our dev server to use Starman with plack directly, rather than via the script runner. We remove the GZip compression as this interferes, and take a local copy of the QueryLog::AdoptPlack trait as it needs a tweak to work. Make sure the CSP header is not output in debug mode, as that would prevent the toolbar JavaScript from running.
Diffstat (limited to 'cpanfile')
-rw-r--r--cpanfile6
1 files changed, 6 insertions, 0 deletions
diff --git a/cpanfile b/cpanfile
index 0d323c363..9b0ff6d93 100644
--- a/cpanfile
+++ b/cpanfile
@@ -115,6 +115,12 @@ requires 'File::ChangeNotify';
requires 'Path::Tiny', '0.104';
requires 'File::Find::Rule';
+# Modules used for development
+requires 'Plack::Middleware::Debug';
+requires 'Plack::Middleware::Debug::DBIC::QueryLog';
+recommends 'Linux::Inotify2' if $^O eq 'linux';
+recommends 'Mac::FSEvents' if $^O eq 'darwin';
+
# Modules used by the test suite
requires 'Test::PostgreSQL';
requires 'CGI::Simple';