>>>>> "DW" == Dave Wolfe <dwolfe@risc.sps.mot.com> writes:
DW> I thought we learned in Mj1 that trend was to more self-explanatory
DW> messages, not terse "expertise".
Sure, but what does that have to do with the fact that I don't intend to
store layout in the strings? It's just a string; the lines will be
combined together in memory and wrapped by the interface. We're not
talking about the help file or any other long response here. Those are
already handled.
DW> There must be something I don't understand here. How does keeping them
DW> in memory benefit unless Mj is a long-lived daemon, serving multiple
DW> requests (where a "request" is, for example, one incoming e-mail)
DW> during each startup?
For the exact same reason that the config file is not a DBM file: it's just
simpler to do it that way. You want to load the translations?
$self->{trans} = do "$listdir/_trans". This pulls in the parsed
translation file in an operation that is _faster_ than loading the DBM
module (and I suspect faster than simply opening a DBM file). Saving the
file is as simple as opening it and printing.
Besides, eventually it will be a long-lived daemon.
Again, I'm working towards simplicity. You want to put a database where
one isn't required. If it ends up being slow, we can rewrite it later.
- J<
References:
|
|