in reply to replaceChild in LibXML

Please give us something we can run.

And you'd do well to avoid the very problematic Switch module. Use 5.10 if you insist on such a construct. 5.10 introduced a switch statement. See perlsyn.