develooper Front page | perl.perl5.porters | Postings from October 2014

Useful op tree debugging trick

Thread Next
From:
Father Chrysostomos
Date:
October 15, 2014 05:47
Subject:
Useful op tree debugging trick
Message ID:
20141015054733.10778.qmail@lists-nntp.develooper.com
I have just found out that you can do multiple -MO= things at once:

$ ./perl -Ilib -MO=Deparse -MO=Concise -e 'my $__; my $x = "$#$__"'
b  <@> leave[1 ref] vKP/REFC ->(end)
1     <0> enter ->2
2     <;> nextstate(main 1 -e:1) v:{ ->3
3     <0> padsv[$__:1,3] vM/LVINTRO ->4
4     <;> nextstate(main 2 -e:1) v:{ ->5
a     <2> sassign vKS/2 ->b
8        <@> stringify[t4] sK/1 ->9
-           <0> ex-pushmark s ->5
7           <1> av2arylen sK/1 ->8
6              <1> rv2av[t3] sKR/1 ->7
5                 <0> padsv[$__:1,3] sM/DREFAV ->6
9        <0> padsv[$x:2,3] sRM*/LVINTRO ->a
use O (split(/,/, 'Concise', 0));
my $__;
my $x = "$#$__";
-e syntax OK

That means I don't have to keep going back and editing the command
line to switch between Concise and Deparse.


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About