in reply to Re: (tye)Re: self-referent hash for your packages
in thread self-referent hash for your packages

True, use strict "refs"; doesn't catch the use of symbolic references via string literals (that is, strings that are compile-time constants). __PACKAGE__ expands to be a string literal.

use strict "refs"; adds run-time checks to make sure that you don't dereference a variable that you expected to contain a real reference but that actually contained something else. Since there is no way for __PACKAGE__ to be a real reference, it sort of makes sense for use strict "refs"; to not disallow dereferencing it. Or you could consider this a bug in strict's implementation.

So I guess I should update what I said from "You don't avoid using symbolic references by avoiding certain types of dereferencing syntax." to this:

You don't avoid using symbolic references by avoiding certain types of dereferencing syntax, but you will need to avoid using certain types "hard-coded" references.

I had forgotten about this quirk of strict.

        - tye (but my friends call me "Tye")