in reply to Can the fully qualified name of a global variable be determined?
use B::Deparse; package TST; our $var; package main; $VARNAME='$var'; print B::Deparse->new()->coderef2text(eval "sub { $VARNAME }" );
OUTPUT:
{ $TST::var; }
And the rest is silence regex! :)
Cheers Rolf
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Can the fully qualified name of a global variable be determined?
by LanX (Saint) on Jan 24, 2013 at 16:31 UTC |