in reply to Blessing interior hashes
I'm not completely sure, but after a quick look at XMLout in XML::Simple, it seems that it tests things this way:
# Handle arrayrefs elsif(UNIVERSAL::isa($ref, 'ARRAY')) {
That will see $ref as the array that it is, even if it's blessed into some class. You can do this in your own code as well, or you can use the reftype method in Scalar::Util.
I can't tell you for sure that XML::Simple is that careful everywhere, so I don't know that blessing some structure that you pass to it won't cause any problems, but that's the way I'd bet. It seems clear that the code has already been written to account for that, at least in some cases, so hopefully it's everywhere.
|
|---|