> On 15 Sep 2018, at 00:12, Vadim Belman <vr...@lflat.org> wrote: >> In Perl 6 culture we never mix them up either, but we also never put subs >> into packages by default. The reason Foo::bar notation doesn't work is >> because bar isn't in Foo anymore unless you explicitly put it there. > Though technically this aspect was clear to me, but to settle things down in > my mind completely: for now ordinary (not 'our') sub belongs not to the > package object but to the block which belongs to that package. Is it correct > way to describe things?
Yes. And you can even introspect it: { sub foo() { } # check out this scope’s lexpad for subroutines .say for MY::.keys.grep: *.starts-with('&’); # &foo } # check out outer scope’s lexpad for subroutines say for MY::.keys.grep: *.starts-with('&’); # nothing