PPI::Normal has the intention, in the long run, of normalizing Perl in such a way that functionally equivalent code will present the same DOM tree. Originally PPI::Normal was close to that, but further development of PPI has scaled it back somewhat.
As for your question about B::Deparse, currently I'm using it like this:
my $deparse = B::Deparse->new( "-p", # add extra parentheses "-q", # expand double-quoted strings "-sC", # cuddle else/elsif/continue blocks "-x3", # expand syntax constructs );
Unfortunately, that doesn't handle the case of variables having different names, even if the code is functionally equivalent. Your LISP solution sounds interesting but I wonder how I would present the got/expected failure information? Not too many people are going to want to look at at a LISP equivalent.
Cheers,
Ovid
New address of my CGI Course.
In reply to Re^2: Test::Code
by Ovid
in thread Test::Code
by Ovid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |