Unless there is an option I missed somewhere, XML::Simple can't roundtrip perl objects either...
use Test::More tests => 1;
use Test::Differences;
use XML::Simple;
my $in = bless( { foo => 'bar' }, 'Something' );
my $out = XMLin( XMLout( $in ) );
eq_or_diff( $in, $out );
__END__
1..1
not ok 1
# Failed test at foo.pl line 8.
# +----+------------------+----------------+
# | Elt|Got |Expected |
# +----+------------------+----------------+
# * 0|bless( { |{ *
# | 1| foo => 'bar' | foo => 'bar' |
# * 2|}, 'Something' ) |} *
# +----+------------------+----------------+
# Looks like you failed 1 test of 1.