in reply to Re: The & prototype and code references in scalars.
in thread The & prototype and code references in scalars.

I didn't think that strictures or local versus global variables had, or could have any bearing on the matter. And in the great scheme of things it doesn't--other than the secondary diagnostic message.

However, I think that your observation that the second part of the error message (not scalar dereference) (which I think is new from 5.10.0) is misleading, if not just plain wrong. In that what I was passing was a scalar containing a reference (to some code), not a dereference.

But having seen the difference in the message you've received when the scalar containing the reference is a lexical, it suggests (perhaps), that the presence of the & prototype modifies what the code producing the message sees in some way.

That is mildly confusing, but not hugely significant. As the messages identifying the source of the error are relatively new, perhaps they'll get honed as time goes on.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"I'd rather go naked than blow up my ass"