good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
XML module conflictsby cLive ;-) (Prior) |
on Mar 07, 2007 at 18:12 UTC ( [id://603660]=perlquestion: print w/replies, xml ) | Need Help?? |
cLive ;-) has asked for the wisdom of the Perl Monks concerning the following question: 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:
yet this didn't
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?
Back to
Seekers of Perl Wisdom
|
|