$| = 1;
use Opcodes qw/ppaddr opdesc/;
my $ppaddr = &Opcodes::ppaddr(0);
my $opdesc = &Opcodes::opdesc(0);
Now run as perl -I/tmp d:COP /tmp/code-test.pl
The problem is that the COP address is always the first statement for the line. And what I really want is the one we are currently at which might not be the first COP of the line. Sigh.