On Mon, Aug 24, 2009 at 3:51 PM, Matthias Dietrich <mdietr...@cpan.org>wrote:

> 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 alters
> "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 => [Gettext => 'local/hello/de.po'],

    })

... on change instead of reloading apache?
_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to