[Catalyst] Announce. Catalyst::Plugin::I18N::DBIC 0.01

Ian Docherty ian at iandocherty.com
Wed Nov 15 06:45:56 GMT 2006


Brandon.
Thanks for the feedback. see below.

Brandon Black wrote:

snip...
> I've just been looking at Cat I18N stuff.  This looks promising (I
> haven't actually used it yet).  Based on the source, I would make a
> few suggestions for the next version:
>
> 1) Make the model name "DBIC::Lexicon" configurable instead of
> hardcoded, via config->{'I18N::DBIC'}->lexicon_model
Since I am extending existing packages that already hard-code the name
'Lexicon' I don't see that this can be changed easily.
>
> 2) Why not make the primary key (language, path, message) instead of a
> random incrementing serial numer that isn't used?  It would help
> reduce accidental redundancy in the database, and give you an index on
> the columns most likely to be searched on.
Certainly, as I think I mention in the docs, the index can be anything you
want and is not required by the module. So by all means set up your
index in this way, the schema was just one example.
>
> 3) Reloading lexicons per-request is going to be wasteful in the most
> common cases.  It might be better to offer a couple of other options
> (via configuration), such as:
>   a) Pre-load the entire Lexicon at app startup
>  b) Dynamically load lexicon paths into memory as they are used, but
> cache them from then on (don't reload unnecessarily)
>
Those are well worth doing. I presume that you are talking about
mod-perl in this case so that the lexicon data is cached between requests.

I will look to do this in a new release.

Thanks for your feedback.
Regards
Ian C. Docherty (ICD)




More information about the Catalyst mailing list