As of today (2017.11,HEAD(e5b660e)) it gives this: ===SORRY!=== Error while compiling -e Variable '$' is not declared at -e:1 ------> say defined ⏏$::<foo>
There was another ticket that had exactly the same change of an error message, perhaps worth searching for it (ping me if you really want to find it). On 2015-02-22 14:03:46, sml...@gmail.com wrote: > The behavior is different for the various syntax forms for looking up > symbols dynamically: > > A) The [sigil at the start; null pseudo-package; name in curly or > angle brackets] form throws an "Index out of bounds" error: > > > $ perl6-m -e 'say defined $::{"foo"}' > ===SORRY!=== > MVMArray: Index out of bounds > > $ perl6-m -e 'say defined $::<foo>' > ===SORRY!=== > MVMArray: Index out of bounds > > $ perl6-m -e 'say defined &::<foo>' > ===SORRY!=== > MVMArray: Index out of bounds > > B) The [sigil at the start; *named* pseudo-package; name in curly or > angle brackets] form fails with "Undeclared routine: &MY" or similar > if the sigil is &, but works fine for other sigils: > > say defined &MY::{"foo"}' > ===SORRY!=== Error while compiling -e > Undeclared routine: > &MY used at line 1 > > $ perl6-m -e 'say defined &MY::<foo>' > ===SORRY!=== Error while compiling -e > Undeclared routine: > &MY used at line 1 > > $ perl6-m -e 'say defined $MY::<foo>' > False > > C) The remaining forms seem to work fine. > > In particular all the ones that use parens instead of curly/angle > brackets to look up the name: > > $ perl6 -e 'say .defined for &::("foo"), &MY::("foo"), $MY::("foo") > False > False > False > > As well as the ones that treat the sigil as part of the name: > > $ perl6 -e 'say .defined for ::<$foo>, ::<&foo>, MY::<&foo>' > False > False > False