This is more of a FYI than a question, but anyway...
I just spent the best part of a couple of hours trying to work out why this worked:
use strict; use warnings; use XML::Simple; my $x = XMLin('./test.xml');
yet this didn't
use strict; use warnings; use XML::Simple; use POE::Component::Jabber::XMPP; my $x = XMLin('./test.xml');
Turns out one the Jabber module loads POE::Filter::XML, which in turn loads XML::SAX
When this happens, XML::Simple defaults to the SAX parser, screwing up filename arguments.
The solution is to add:
$XML::Simple::PREFERRED_PARSER = 'XML::Parser';to the script, but that feels clutzy.
I'm pondering on whether there's a better approach for the XML::Simple module, and would welcome input before I send an email to the module's owner. It doesn't seem right to me that a module's behaviour would change just by loading another module. Or am I just not being lazy enough? ;-) Thoughts?
In reply to XML module conflicts by cLive ;-)
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |