You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
B::Concise tries hard to hide its own BEGIN blocks when asked to report
BEGIN blocks in end-user's code. It does this by maintaining a count of
each BEGIN/use/no (and those of the dependencies) and then splicing
these BEGIN blocks off before printing. However this count has drifted
over time, which this commit fixes.
Before:
$ perl -MO=Concise,BEGIN,-exec -e 'BEGIN {1} BEGIN {2}'
... BEGIN 1-8 ...
BEGIN 9:
26 <;> nextstate(main 2 -e:1) v
27 <$> const[IV 1] s
28 <1> leavesub[1 ref] K/REFC,1
BEGIN 10:
29 <;> nextstate(main 4 -e:1) v
2a <$> const[IV 2] s
2b <1> leavesub[1 ref] K/REFC,1
-e syntax OK
After:
$ perl -MO=Concise,BEGIN,-exec -e 'BEGIN {1} BEGIN {2}'
BEGIN 1:
1 <;> nextstate(main 2 -e:1) v
2 <$> const[IV 1] s
3 <1> leavesub[1 ref] K/REFC,1
BEGIN 2:
4 <;> nextstate(main 4 -e:1) v
5 <$> const[IV 2] s
6 <1> leavesub[1 ref] K/REFC,1
-e syntax OK
The tests in ext/B/t/optree_specials.t now correctly only show the
things being tested, but that also meant removing the bogus final test,
as with this fix the code under test outputs nothing as it has no phase
blocks in it.
0 commit comments