in reply to Re^6: XML::Writer oddness
in thread XML::Writer oddness

After that, $doc is still a blessed object (although $copy isn't).

In the OP, you have $doc declared as my variable, so fiddling around with the symbol table doesn't do anything to my $doc.