[Catalyst] Class name rewrite
Danijel Milicevic
Danijel.Milicevic at rawmode.org
Mon Jul 11 19:49:10 CEST 2005
Hi,
Am Sonntag, den 10.07.2005, 19:11 -0400 schrieb Vsevolod (Simon)
Ilyushchenko:
> Hi,
>
> I'm continuing to port my work apps to Catalyst. I've realized that
> Catalyst does not give you a choice in how it names autogenerated
> classes. In my case, it's a problem - the data for class Job for
> application named GA is stored in the table GAJob. It's easy to
> distinguish between tables for different applications if the table names
> are prefixed, but I don't want to see the prefixes in the class names.
>
> I've worked around this by overriding the
> Class::DBI::Loader::Generic::_table2class method in the manner suggested
> by James Tolley a week before. However, I wish the framework let me to
> do this explicitly.
>
> Simon
I'm a bit confused. Wouldn't simple renaming of the autogenerated
classes solve your problem here? If you want to specify a class name for
each table it would be even more work (typing-wise). Remember Catalyst
will pick up every module in C/ M/ or V/ as long as it has the "use
'Catalyst::Base';" line.
Regards,
Danijel
More information about the Catalyst
mailing list