Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

CatalystX::REPL and having a REPL to debug Catalyst easier

by spx2 (Chaplain)
on May 07, 2011 at 14:19 UTC ( #903558=perlquestion: print w/ replies, xml ) Need Help??
spx2 has asked for the wisdom of the Perl Monks concerning the following question:

Hello,

I'm playing around with Catalyst and since there's this really good module on CPAN called Devel::REPL and an extension for Catalyst called CatalystX::REPL I gave it a spin.

I also had some problems installing Devel::REPL, but I managed to fix that too.

However, I wasn't able to get CatalystX::REPL working after following all the instructions in the documentation. I was just not getting any cursor, Devel::REPL wasn't firing up.

So I had to make my own small hack and so here goes the code I wrote in an action to get a REPL:

use Devel::REPL; ...CATALYST CODE... sub action_name { my ($self,$c) = @_ ... ########### Devel::REPL break $Devel::REPL::Plugin::Packages::DefaultScratchpad::ctx = $c; my $repl = Devel::REPL->new; $repl->load_plugin($_) for qw(History LexEnv Packages PPI); $repl->eval('my $c = $Devel::REPL::Plugin::Packages::DefaultScratch +pad::ctx;'); $repl->eval('warn "\n\n[USE \$c from Catalyst!!]\n\n;";'); $repl->run; ########### .... }
I wanted to ask if there's someone who was able to get CatalystX::REPL working and what settings did you use, maybe there was something I missed.

Thanks,
Stefan

Comment on CatalystX::REPL and having a REPL to debug Catalyst easier
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://903558]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2014-07-14 10:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (257 votes), past polls