OK, this ain't pretty...
use 5.010; use Lexical::Types; use Hash::FieldHash qw(fieldhash); BEGIN { fieldhash %::_TYPE_TRACKER } BEGIN { package Foobar; sub TYPEDSCALAR { $::_TYPE_TRACKER{\$_[1]} = $_[2] } } my Foobar $foo = "Hello"; say $::_TYPE_TRACKER{ \$foo };
In reply to Re: Detecting declaration type?
by tobyink
in thread Detecting declaration type?
by LanX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |