paperlined.org
tmp
document updated 1 year, 10 months ago, on Jun 10, 2022

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

If you do something like:

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

And voila! They match!