Looking at the source for Int, I see that all of the classes are declared with my
, which I would have thought would make them private and not available outside that file. But, they obviously are. Why do they need to be declared that way?
my class Rat { ... }
my class X::Numeric::DivideByZero { ... }
my class X::NYI::BigInt { ... }
my class Int { ... }
my subset UInt of Int where {not .defined or $_ >= 0};
my class Int does Real { # declared in BOOTSTRAP
I figure that BOOTSTRAP comment has something to do with it. In the Perl6/Metamodel/BOOTSTRAP.nqp there are lines like:
my stub Int metaclass Perl6::Metamodel::ClassHOW { ... };