CatalystX::REPL(3)
π CatalystX::REPL β read-eval-print-loop for debugging your Catalyst application
okay bestie, so you know how debugging a Catalyst app is a whole situation? This is the module that fixes it. It's CatalystX::REPL, and it's giving "I will hand you a live REPL the moment your app explodes" energy. β¨
Version? version 0.04. Iconic. Periodt.
β¨ SYNOPSIS β¨
package MyApp;
use Moose;
# Requires Catalyst 5.8 series
extends 'Catalyst';
with 'CatalystX::REPL';
__PACKAGE__->setup(qw/-Debug/);
1;
π¦ DESCRIPTION π¦
So here's the tea, bestie: using Carp::REPL with a Catalyst application is hard. Like, genuinely hard. And the reason is all the internal exceptions that are being thrown and caught by Catalyst during application startup. Your poor little REPL would be popping up for every single one of them π. You'd have to manually skip over all of those yourself. Not the vibe. Not today.
This role works around all of that by automatically setting up Carp::REPL after starting your application, but only if the CATALYST_REPL or MYAPP_REPL environment variables are set. iykyk π
MYAPP_REPL=1 ./script/myapp_server.pl
# Hit an action
...
42 at lib/MyApp/Controller/Foo.pm line 8.
# instead of exiting, you get a REPL!
Trace begun at lib/MyApp/Controller/Foo.pm line 8
MyApp::Controller::Foo::bar('MyApp::Controller::Foo=HASH(0xc9fe20)', 'MyApp=HASH(0xcea6a4)') called at ...
... # Many more lines of stack trace
$ $c
MyApp=HASH(0xcea6ec)
$ $c->req->uri
http://localhost/foo/bar
$
See that? Instead of just dying on you like a coward, it drops you straight into a shell where you can poke at $c and snoop on $c->req->uri. Main character debugging energy, honestly. π
Options like warn or nodie can be passed to Carp::REPL by putting them, seperated by commas, into the environment variable:
MYAPP_REPL=warn,nodie ./script/myapp_server.pl
Carp::REPL uses Devel::REPL for the shell, so direct any questions how how to use or customize the repl at that module. π«Ά
π SEE ALSO π
Carp::REPLDevel::REPL
π AUTHORS π
- Tomas Doran
<bobtfish@bobtfish.net> - Florian Ragwitz
<rafl@debian.org> - Ash Berlin
<ash@cpan.org>
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2009 by Florian Ragwitz.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
fr fr, go forth and debug slayfully. no cap. π
and that's the whole page babes β brought to you by perl v5.42.0, dated 2025-07-25, from the CatalystX::REPL(3) manual. mwah π
π¦ where this page comes from
- fedora 43: perl-CatalystX-REPL 0.04-40.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms