[Catalyst] Hops-0.05 and two questions
Vsevolod (Simon) Ilyushchenko
simonf at cshl.edu
Tue Jul 5 03:18:19 CEST 2005
On suggestion from Will Hawes, I've got rid of the uri_base parameter in
Hops and released version 0.05. It's at
For the new list members, Hops is a demo of generic database CRUD
operations using Catalyst, rewritten from the Maypole BeerDB example.
I've finally tried to use Catalyst in some real-world applications, and
here are two issues I've run into:
1. By default, Class::DBI::Loader::Generic tries to create classes for
all tables. I have over a hundred tables serving about 10 applications,
and I don't want to auto-discover all of the tables. So, I'd like to use
my own loader that specifies which tables to load.
Currently, Catalyst::Model::CDBI::new explicitly uses
Class::DBI::Loader. I would separate loader creation into a method
called something like "initLoader" and let subclasses override it.
However, it's not so easy, because Class::DBI::Loader::Generic
autodiscovers the loader class that's appropriate for the database type.
I'd like to override the loader name at this point, but I'm not sure how.
2. When I tried to use a Mason view, I got the following error:
Couldn't instantiate component "CSHL::GA::V::View", "The 'comp_root'
parameter ("/var/www/libperl/CSHL/GA/root") to
HTML::Mason::Resolver::File->new() was a 'hashref object', which is not
one of the allowed types: scalar arrayref" at
/opt/software/perl/lib/Module/Pluggable/Fast.pm line 86
The method Catalyst::View::Mason::new() passes the value of comp_root to
the HTML::Mason::Interp constructor. However, comp_root is an instance
of Path::Class::Dir, not a simple string, and the HTML::Mason::Interp
constructor does not like it.
I'm using the latest Catalyst 5.30 and HTML::Mason 1.28, but nobody else
has reported this error, so perhaps I'm doing something stupid.
Simon (Vsevolod ILyushchenko) simonf at cshl.edu
Terrorism is a tactic and so to declare war on terrorism
is equivalent to Roosevelt's declaring war on blitzkrieg.
Zbigniew Brzezinski, U.S. national security advisor, 1977-81
More information about the Catalyst