On 20/11/2017 15:22, [EMAIL PROTECTED] wrote:
> Yes, that will work, but note that you do still continue to skip constants, which are callable as methods.  I don’t know whether that matters to you.

I think it doesn't matter much and it's OK to stick to the current behavior
for now.

It seems that constants are initially stored as refs in a stash (for example
as scalarrefs, arrayrefs, refs-to-refs), but if they're evaluated using method
syntax for the first time, they get converted to globs. So we treat constants
inconsistently which is a bug, although a really minor one.

If there is a way to detect constants reliably, maybe via %constant::declared,
we could make sure that they are ignored or throw an error if a constant
shadows a method name. OTOH, constants can be called with method syntax, so we
could also allow them as methods.

Nick