Patrick R. Michaud wrote:
How does one create a new class with a name determined dynamically
at runtime?
For example, suppose I have a string like 'PGE::Perl6Grammar', and
from that I want to create a ['PGE';'Perl6Grammar'] class. The code
$ cat z1.pir
.sub main :main
$S0 = 'PGE::Perl6Grammar'
$P0 = split '::', $S0
$P1 = newclass $P0
say $P1
.end
Now works in r21848, as does 'new' with the same array. It only accepts
ResizableStringArrays at the moment, but let me know if you end up
needing FixedStringArrays too.
Allison