in reply to Detecting declaration type?
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 };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Detecting declaration type?
by LanX (Saint) on Sep 18, 2012 at 18:16 UTC |