Is there anything like Ruby on Rails' script console for Perl's Catalyst? From rubyonrails.org:

The console command lets you interact with your Rails application from the command line. On the underside, rails console uses IRB, so if you’ve ever used it, you’ll be right at home. This is useful for testing out quick ideas with code and changing data server-side without touching the website.

I found a blog post talking about implementing it with Devel::REPL, but I cannot get it to work...

有帮助吗?

解决方案

No. And, for that matter only a very small percentage of Perl users use opt for the Perl debugger at all -- this is largely because it's faster to execute and throw an exception, and because of the total transparency of Perl Objects -- they're just blessed Hashes and they serialize into strings pretty well.

I happen to like XXX, drop an

use XXX;
XXX \%hash;

or do a Catalyst::Exception->throw( YYY %v );

其他提示

I've been using CatalystX::REPL with success. I'm not familiar with the RoR console but, basically, CatalystX::REPL will drop you into an interactive environment where you can inspect the application's context object and so on.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top