use strict;
use warnings;
use PPI::Document;
my $d1 = PPI::Document->new('$x++');
my $d2 = PPI::Document->new('$x += 1');
my $d3 = PPI::Document->new('$x = x + 1');
print((($d1->normalized() == $d2->normalized) &&
($d2->normalized() == $d3->normalized) &&
($d3->normalized() == $d1->normalized)) ?
"they are all equivalent\n" : "they are not equvalient\n");
print(($d1->normalized() == $d2->normalized) ?
"1 and 2 are equivalent\n" : "1 and 2 are not equvalient\n");
print(($d2->normalized() == $d3->normalized) ?
"2 and 3 are equivalent\n" : "2 and 3 are not equvalient\n");
print(($d3->normalized() == $d1->normalized) ?
"3 and 1 are equivalent\n" : "3 and 1 are not equvalient\n");
##```
##
they are not equvalient
1 and 2 are not equvalient
2 and 3 are not equvalient
3 and 1 are not equvalient
```