develooper Front page | perl.perl5.porters | Postings from June 2018

On refactoring B::Deparse

Thread Next
Rocky Bernstein
June 8, 2018 18:06
On refactoring B::Deparse
Message ID:
I will be giving a talk at the upcoming YAPC 2018 in Glasgow on
B::DeparseTree and its use in stack traces and in the Devel::Trepan. As a
result, I have been completely refactoring the code that I started in 2015.

However I now see that this refactoring is also valid as a way to refactor
B::Deparse. So I bring this to p5p developers attention in case there's any
interest in contributing to this as a possible future replacement to
Or if there are developers who want to "backport"  ideas from
B::DeparseTree into B::Deparse.

In my biased opinion, B::DeparseTree is more fun to work on. Some effort
was put into making it more debugable and developer friendly.

B:DeparseTree could also be used as a stepping stone to provide an AST as
suggested by chromatic in

Finally, B::DeparseTree might provide a better framework for providing more
reliable and extensive kinds of Perl syntax reformatting: in its parallel
tree it can store higher level Perl syntax information gleaned from lower
levels in the tree. One small example includes whether an expression needed
parenthesis for precedence.

The refactoring is probably only 2/3rds done and B::DeparseTree has long
way to go to get up to the level of accuracy that B::Deparse currently has.
There is plenty of work still to be done. So again, I hope others will help

For more information, I have written about my experiences so far in
or see

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About