cv_gv#

Return the B::GV that a named CV belongs to.

Synopsis#

my $cv = B::svref_2object(\&main::foo);
my $gv = $cv->GV;      # B::GV for *main::foo
print $gv->NAME;       # "foo"

Anonymous and lexical subs may return a B::SPECIAL or a sentinel rather than a real B::GV; check with isa before calling NAME.