freebsd-ports/devel/p5-B-Debug/pkg-descr
James E Keenan 6990380dff devel/p5-B-Debug: new port to walk Perl syntax tree, printing debug info about ops
As of perl-5.30, released in the spring of 2019, B-Debug is no longer shipped
with the Perl 5 core distribution.  So at the present time it's not available
through FreeBSD ports.

PR:	258350
Reported by:	jkeenan@pobox.com
2021-11-21 19:56:09 +01:00

23 lines
609 B
Text

Walk Perl syntax tree, printing debug info about ops
Without actually executing a Perl 5 program, you can walk its optree:
$ cat hello.pl
print "Hello world!\n";
$ perl -MO=Debug hello.pl
hello.pl syntax OK
LISTOP (0x55d1520414f8)
op_ppaddr 0x55d1520414f8 LISTOP [OP_LEAVE]
op_next 0x0
op_sibling 0x0
op_targ 1
...
OP (0x55d1520414c8)
op_ppaddr 0x55d1520414c8 OP [OP_ENTER]
op_next 0x55d152041538 COP [OP_NEXTSTATE]
op_sibling 0x55d152041538 COP [OP_NEXTSTATE]
op_targ 0
...
WWW: https://metacpan.org/release/B-Debug