document updated 2 years ago, on Jun 10, 2022

Using B::Concise to double-check that Perl::Tidy hasn't broken anything.

If you do something like:

$ perltidy < >
$ perl -MO=Concise > a.syntaxtree
$ perl -MO=Concise > b.syntaxtree
$ vimdiff a.syntaxtree b.syntaxtree

It seems that they 99% agree with each other. The only differences are the COPs (Control OPs) (more), which have different line numbers.

So, do this instead:

$ perl -MO=Concise | perl -ple 's/(<;> nextstate\(\S+ \S+) \S+\)/$1)/' > a.syntaxtree
$ perl -MO=Concise | perl -ple 's/(<;> nextstate\(\S+ \S+) \S+\)/$1)/' > b.syntaxtree

And voila! They match!