in reply to Misbehaving typeglob
{ no strict qw/refs vars/; local $varname = 'bar'; local $fullname = "Foo::$varname"; foreach my $type ( qw<SCALAR ARRAY HASH CODE IO FORMAT> ) { print $type if (defined *{$fullname}{$type} and !($type eq 'SC +ALAR' and !defined($$fullname)) ); } }
|
|---|