Dear Log,
I've been fiddling with RTF-generating code lately, for the ever-popular task of reading in a
lexicon database and spitting out a tidily formatted happily sorted RTF file ready for hardcopying.
It's never the same thing twice, so I can rarely reuse much code from one lexicon rendering task
to the next. But that's not exactly tragic. What is tragic is this line of code I just wrote:
'verb' eq ( (values %{ $h2e->{$h2e_key} })[0]->[0]{'wc'} || '' )
If I were OOey/structy, that'd have been something like $haida_lex -> headword_group_by_key($h2e_key) -> gloss_group_by_index(0) -> entry_by_index(0) -> wordclass() || '' eq 'verb'.
For the actual RTF bits, I find myself constantly referring to this one BRILLIANT book called RTF Pocket Guide. BRILLIANT!