Theiling Online    Sitemap    Conlang Mailing List HQ   

Re: TECH: a possible bug and Latin stress rules in schcompile

From:Benct Philip Jonsson <bpj@...>
Date:Tuesday, April 25, 2006, 19:51
Henrik Theiling skrev:
> Hi! > > Benct Philip Jonsson <bpj@...> writes: > >>I have come upon a possible bug in schcompile, or rather its >>output files: when using a subroutine in a schcompile- >>generated module I have to specify the package, i.e. >> >> use latinstress; >> ... >> $w = step_stress($w); >> >>doesn't work. I have to say >> >> use latinstress; >> ... >> $w = latinstress::step_stress($w); > > > No bug, but a feature.
I realized that later. I thought that you normally could/ would use functions from a module without specifying the package -- I suppose that's what "@EXPORT_OK instead of @EXPORT" is about? -- but I realize that would be bad indeed in this case: imagine you have one French and one English sch module, then you want to import some Latin words into English by way of French, and you happen to have a step_stress in both modules! I guess I'll have to name my modules so that the "package::step_NAME"s make sense to my mind! :-)
> That's just one standard Perl method of > exporting: don't automatically export all stuff, but allow the user to > import. I.e., the compiler generates @EXPORT_OK instead of @EXPORT. > You can import those functions you need in the standard way: > > use latinstress 'step_stress'; > > > BTW, if you want to trace your soun changes, use > > latinstress::set_trace(1);
Where does the trace go? Can it be directed to a specific file or variable, other than where the "final" derivations go? Perhaps I'm dense for wanting that...
> This is yet undocumented but will prove handy, I think. (There's also > set_debug, which is similar, but would need more explanation, so let's > not mention that now...)
I found I would need a way to specify the beginning of the word. I *seems* upon testing that ^ would work for this. Is it a feature or merely accidental -- i.e. is it safe? I have (or rather my uni library has) an excellently organized historical phonology of English, framed in the traditional mode of presentation, which IMHO is a Good Thing, which even gives the approximate dates for the changes. I intend to cut my teeth on sch with its help, all the way from PIE to whenever it leaves off (somewhere after r-loss...) Not a promise, merely a statement of what I want to do... :-) -- /BP 8^)> -- Benct Philip Jonsson -- melroch at melroch dot se "Maybe" is a strange word. When mum or dad says it it means "yes", but when my big brothers say it it means "no"! (Philip Jonsson jr, age 7)