in reply to Introspection, strict, warnings and "defined"

Is there any way to avoid the no strict 'refs' statement?

Yes, the symbol table is available as %::, but it's easier not to. Just limit the scope of no strict 'refs' to where you need it.

Is there any way to write a use statement to accept a variable without the eval technique Martin produced? It seems inelegant to me.

use if 1, $pkg;

or

my $file = $pkg; $file =~ s{::}{/}g; $file .= '.pm'; require $file; import $file;

The second has the advantage that you can avoid the import you don't want to perform anyway.

While the message is longer using diagnostics, nothing seems to be able to get rid of the run-time warning

You're doing something wrong if you're using defined(%hash).

You should be checking if the HASH slot of the symbol table entry is populated (*{"${pkg}::$_"}{HASH}).

Again, this may be related. If the code is run on Data::Dumper, almost all the scalars are the same as subs.

Scalars are almost(?) always created for globs when they are created.