I am implementing a module which [currently] has only the following function:

    permute_string($s)
        Given an arbitrary string, "permute_string()" returns
        a reference to an unsorted array of all unique strings
        that are canonically equivalent to the argument.

As an example, if given a string such as "\x{1eb7}\x{0303}", the function returns an array containing all the following strings:

   "a\x{0306}\x{0303}\x{0323}"
   "a\x{0306}\x{0323}\x{0303}"
   "a\x{0323}\x{0306}\x{0303}"
   "\x{0103}\x{0303}\x{0323}"
   "\x{0103}\x{0323}\x{0303}"
   "\x{1ea1}\x{0306}\x{0303}"
   "\x{1eb5}\x{0323}"
   "\x{1eb7}\x{0303}"

This can be used, for example, to generate test data for a text processing function, or to help construct or test OpenType rules for a font.

I am looking for recommendations on where this function belongs:

1) Does it belong in some existing module?

2) Does it belong in its own module, and if so what?

My preference is something like Unicode::Equivalents but according to https://pause.perl.org/pause/authenquery?ACTION=pause_namingmodules "Unicode" may be off-limit.

Suggestions?

Bob

Reply via email to