I love me some little hacks
Apr. 11th, 2009 02:37 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
For instance:
(but I should probably not let something like that creep into core. Long list of if-statements, it is.)
(Originally posted to Dreamwidth http://afuna.dreamwidth.org/6673.html)
foreach var string module ( $*modules_available ) {
# FIXME: get the values in less hacky manner
var string section = get_plural_phrase( 0, "module_${module}_section" );
var int order = int(get_plural_phrase( 0, "module_${module}_order" ));
$*module_sections{$section}[$order]=[$module];
}
(but I should probably not let something like that creep into core. Long list of if-statements, it is.)
(Originally posted to Dreamwidth http://afuna.dreamwidth.org/6673.html)