Miscellaneous

How does Catalyst compare with Ruby on Rails?

See http://www.wikivs.com/wiki/Catalyst_vs_Ruby_on_Rails

What are the recommended modules to use with Catalyst for various tasks?

See Recommended Plugins

How do I use Unicode in my Catalyst application?

See Using Unicode

Where is the source? I want to submit diffs!

See Contributing.

Application architecture

How can I use Catalyst stuff from regular Perl scripts?

See Using Catalyst Models Externally but use Config::JFDI instead of the suggested "kludgy" solution.

Why do I get Caught exception in MyApp::Controller::Root->end "Catalyst::Action::RenderView could not find a view to forward to."?

Create a view using the myapp_create.pl view helper.

How can I access $c->cache from a script?

Configuration

My new style myapp.conf isn't read, why?

Install Config::General. Try: cpan Config::General

What is the precedence of various configuration setting locations?

Settings are overridden in this order: MyApp/Model/Foo.pm, MyApp.pm, myapp.conf, myapp_local.conf

Debugging/profiling

How can I profile Catalyst code running in a fcgi environment using the -d perl profilers like Devel::NYTProf?

Fire a FastCGI kid up against the socket using perl -d

For other ways to profile your Catalyst code, see these threads by Jonathan Rockway: 1, 2.

See also Catalyst::Stats.

How do I have my application e-mail me whenever there is an error?

What does the error screen below mean?

(en) Please come back later
(fr) SVP veuillez revenir plus tard
(de) Bitte versuchen sie es spaeter nocheinmal
(at) Konnten's bitt'schoen spaeter nochmal reinschauen
(no) Vennligst prov igjen senere
(dk) Venligst prov igen senere
(pl) Prosze sprobowac pozniej

It means an exception has occurred but debugging was disabled. Check the application error log for details. The error log may be stored in the server's error log, or if you followed deployment guidelines similar to those for lighttpd, it will be stored in a separate file.

You may also deliver a custom error message in this case, please see: Delivering a Custom Error Page

How do I hide certain variables (e.g. user/password) from the debug screen?

Q: I want to send someone the URL to myapp failing to get help with the error, but the debug screen shows the username and password to connect to my DB. How do I disable that?

A: In \MyApp.pm, override $c->dump_these, which controls the variables to dump in the debug screen:

use MRO::Compat;
sub dump_these {
    my $c = shift;
    my @variables = $c->next::method(@_);
    return grep { $_->[0] ne 'Config' } @variables;
}

Database

How do I automatically create schema files for my database?

Use Catalyst::Helper::Model::DBIC::Schema. Assuming you have a myapp.db SQLite database, run

script/myapp_create.pl model DB DBIC::Schema MyApp::Schema create=static "dbi:SQLite:myapp.db"

Is there some easy CRUD web interface that I can use with Catalyst?

See Catalyst::Plugin::AutoCRUD. If you have created the model and schema (see the previous question), all it takes is to add AutoCRUD to the list of plugins and browse to /autocrud.

Deployment

How should I ship/package my Catalyst application?

If you ship a tarball with your Catalyst app and a local::lib, all your customers need is perl.

Why does apache and fastcgi complain that it can't find my .tt2 files? (non-windows)

Try running the development server. If the templates render you most likely have a permissions problem that is preventing the apache user from accessing your template files. Remember, the development server is run as yourself (the user you are logged in as) so permission problems may not be apparent until you roll out your site.

Using Catalyst::Engine::HTTP, my queries run fast locally, but from other computers, there's a huge pause before requests are satisfied - why?

Your DNS is likely borked - edit /etc/hosts (or c:\windows\system32\drivers\etc\hosts in Windows) to add the other computers' hostnames.
Solution 2: fix your DNS so other hosts resolve hostnames.

I want to use Catalys to deploy an IPv6 aware application, how can I do it?

Catalyst does not have any problems with deployment of IPv6 aware applications, as long as it is done through an IPv6 aware HTTP engine (like Apache). However, the myapp_server script currently only listens on an IPv4 socket, and ignores any IPv6 addresses that your server may have.

In other words, testing is a bit more difficult than for IPv4, but there are no known problems with deployment of Catalyst IPv6 aware applications.

My tags:
 
Popular tags:
 
Powered by Catalyst
Powered by MojoMojo