problem-solving
problem-solving copied to clipboard
There is no easy way to use an EXPORT sub to export a long named spaces class
If I try to do something like:
my \bla = Metamodel::ClassHOW.new_type: :name<Bla::Ble::Bli::Blo::Blu>;
bla.^compose;
sub EXPORT(--> Map()) {
"Bla::Ble::Bli::Blo::Blu" => bla
}
When I use that, it adds the whole name as a key on ::.keys, which doesn't work.
If I try something like:
module Bla::Ble::Bli::Blo {}
Bla::Ble::Bli::Blo::<Blu> := bla;
It tends to conflict with modules declared outside that file.
I belive it should be an easy way of doing that.