It seems like the PPI::Document destructor is getting engaged sometimes in a way that breaks child elements when references to those children remain? The below works as (I) expected with redefine of the destructor, but breaks when I comment that line out..
use strict;
use warnings; no warnings 'once';
use PPI::Document; # VERSION 1.220
*PPI::Document::DESTROY = sub { };
my ($ppistatementpackage) = PPI::Document->new(\"package Blah;")->children;
print "$ppistatementpackage";
It seems like the PPI::Document destructor is getting engaged sometimes in a way that breaks child elements when references to those children remain? The below works as (I) expected with redefine of the destructor, but breaks when I comment that line out..