Theiling Online    Sitemap    Conlang Mailing List HQ   

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

From:Henrik Theiling <theiling@...>
Date:Tuesday, April 25, 2006, 14:38
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. 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); 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...) **Henrik

Reply

Benct Philip Jonsson <bpj@...>