Now, I've seen that the subroutines in the package file follow a specific syntax...what does a rule look like in a package file?
Also, I had a little trouble when putting my new package to use, in that the "shortcut method" in the final routine here failed, and I ended up hard-coding the code points for those characters.
sub InThaiHCons { #High-class consonants return <<'END'; 0E02 0E03 0E09 0E10 0E16 0E1C 0E1D 0E28 0E29 0E2A 0E2B END } sub InThaiMCons { #Middle-class consonants return <<'END'; 0E01 0E08 0E0E 0E0F 0E14 0E15 0E1A 0E1B 0E2D END } ################################ Low-class consonants =for NON-WORKING EXAMPLE sub InThaiLCons { #THIS DIDN'T WORK return <<'END'; +Thai::InThaiCons -Thai::InThaiHcons -Thai::InThaiMCons END } =cut sub InThaiLCons { #THIS DOES WORK return <<'END'; 0E04 0E07 0E0A 0E0D 0E11 0E13 0E17 0E19 0E1E 0E27 0E2C 0E2E END }
Why?
Thanks so much for your help!
Blessings,
~Polyglot~
In reply to Re^4: Creating new character classes for foreign languages
by Polyglot
in thread Creating new character classes for foreign languages
by Polyglot
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |