Skip to content

Commit

Permalink
Give stub packages created by package_at_key a proper longname
Browse files Browse the repository at this point in the history
Stub packages created by simply accessing them like &Foo::Bar::note = sub { };
only got the last part of their name ("Bar"). Now they know who they really are
(Foo::Bar).
  • Loading branch information
niner committed Nov 28, 2020
1 parent 3d46341 commit aab4f55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core.c/Stash.pm6
Expand Up @@ -34,7 +34,7 @@ my class Stash { # declared in BOOTSTRAP
nqp::ifnull(
nqp::atkey(storage,$key),
nqp::stmts(
(my $pkg := Metamodel::PackageHOW.new_type(:name($key))),
(my $pkg := Metamodel::PackageHOW.new_type(:name("{$!longname}::$key"))),
$pkg.^compose,
nqp::bindkey(storage,$key,$pkg)
)
Expand Down

0 comments on commit aab4f55

Please sign in to comment.