in reply to Re^2: Text storage/retrieval
in thread Text storage/retrieval
I see little difference in maintainablility between:
( "The quick", "brown fox", "jumps over", "the lazy", "dog", );
And:
"The quick", "brown fox", "jumps over", "the lazy", "dog"
But if you do, you could do the same thing -- put each language into a separate csv file -- and do:
my @text = someCSVparser( "$lang.csv" ); ...
It'll be slower, but for 1500 strings, probably not enough to worry about.
If performance is a concern -- as it seemed from your OP -- then you could store the texts in .csv files and use an off-line process to create the Storable form from them whenever they change. It has the advantage of ensuring that if the storable format shoudl ever change in incompatible ways -- it has happened in the past -- then you have the sources to fall back on.
|
|---|