aboutsummaryrefslogtreecommitdiffstats
path: root/devel/p5-B-Debug/pkg-descr
blob: 721001dc0f2f1c6e36f9532ec8e442d85670ef2a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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
    	...