Here's an interesting difference in behavior for rakudo.
Somehow, when I get this, I get the proper MetaModel, which is ClassHOW:
perl6 -Ilib -e 'unit package ColorTest; INIT { require ::("Color"); }; sub test { ::("Color").HOW.^name.say }; test'
But when I change this into a file, particularly a module, I get something unexpectedly different:
Test.pm
unit package Color::Test
INIT {
require ::("Color");
}
sub test is export {
say ::("Color").HOW.^name;
}
The test, and the weird result:
$ perl6 -Ilib -e 'use Color::Test; test'
Perl6::Metamodel::PackageHOW
So what causes the difference in metamodels when we require the Color module in this way?
UPDATE!
Ulps. I managed to reproduce it on the command line, so WTF?
$ perl6 -Ilib -e 'unit package Color::Test; INIT { require ::("Color"); }; sub test { ::("Color").HOW.^name.say }; test'
Perl6::Metamodel::PackageHOW