http://www.perlmonks.org?node_id=214264


in reply to Getting a code ref to main

To my knowledge, it's not really a cv at all, it's just the root op of the optree. The best I can suggest is main_root:

use B 'main_root'; use B::Deparse; my $deparse = B::Deparse->new(); print $deparse->( main_root, 0 );