[Catalyst] Restarting Catalyst on request or doing something per request

Wade Stuart wbs at grepit.net
Tue Aug 25 11:48:13 GMT 2009


On Mon, Aug 24, 2009 at 3:51 PM, Matthias Dietrich <mdietrich at cpan.org>wrot=
e:

> Hi Chris,
>
> Am 24.08.2009 um 04:43 schrieb Chris:
>
>  Can you use catalyst::plugin::cache as the backend for the lexicon?
>> Then refreshing the texts involves clearing the cache, and updates are
>> transparent.
>>
>
> I took a quick look at C::P::Cache and I don't think it is possible to use
> this module as the backend with adequate work.  Locale::Maketext::Lexicon
> stores the text somewhere under its own package name in a hash.  To use a
> cache backend here would mean creating a module around L::M::L which alte=
rs
> "internal" data whereas this new module would depend on the current L::M:=
:L
> module version.  I don't think this would be good.
>
> So from my point of view the best way would be to reload the lexicon data
> once it has changed.  As this is not possible without manually restarting
> apache, this leads me to reloading the lexicon after the database contents
> has changed within each apache client on request start (before any lexicon
> text is requested).  I could initiate this within an auto sub in Root.pm,
> but this seems very ugly.  I guess a new plugin (like
> C::P::I18N::DBI::Reloader) would be good.  What do you think?
>
>
Why cant you just do a:

# ... incrementally add new lexicons
    Locale::Maketext::Lexicon->import({
        de =3D> [Gettext =3D> 'local/hello/de.po'],

    })

... on change instead of reloading apache?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20090825/09b62=
31b/attachment.htm


More information about the Catalyst mailing list