Can I limit my Perl 6 program to running under a particular implementation?

Viewed 160

The dd routine is a Rakudo-specific feature, but that's incidental to my question. Is there a way inside a program to check the implementation and bail out if it's not the right one? Do I have to do this on my own?

 die "Unsupported VM" unless $*VM ~~ m/^ 'moar' /;

Maybe we need something like Perl 5's Devel::AssertOS.

I'm not at all interested in creating implementation-specific programs, but I can imagine cases where one implementation has particular quirks and bugs that are incompatible with a program. Because, you know, that was Java for several years (remember the MRJ?).

1 Answers
Related