2008/12/8 Frederic Demians <[EMAIL PROTECTED]>: > >> I prepared two commits for koha to force the use of the LibXML parser. >> Can you test them and apply them if they are ok ? (I only greped for >> any occurrences of XML::Simple and MARC::File::XML and add the correct >> line). Both commits are available at the top of my wip-for-upstream >> branch: >> http://git.debian.org/?p=collab-maint/koha.git;a=shortlog;h=refs/heads/wip-for-upstream >> They are: >> - "Force MARC::File::XML to use the XML::LibXML::SAX parser" > > You have: > > $XML::SAX::ParserPackage = "XML::LibXML::SAX"; > use MARC::File::XML; > > It doesn't work. I've tested it on a Debian box where I can see > immediately if extended characters are properly displayed or not which > is not the case with your patch. This modification works: > > $XML::SAX::ParserPackage = "XML::LibXML::SAX"; > require MARC::File::XML;
This is because "use" is inside an implicit "BEGIN" block, so it would be executed before $XML::SAX::ParserPackage is set. I haven't tested it but this should work too: BEGIN { $XML::SAX::ParserPackage = "XML::LibXML::SAX"; } use MARC::File::XML; Depending on whether anything is actually imported (a "use" is a "require" followed by an "import"), this would mean a slightly different thing. -- cheers, -ambrose The 'net used to be run by smart people; now many sites are run by idiots. So SAD... (Sites that do spam filtering on mails sent to the abuse contact need to be cut off the net...) _______________________________________________ Koha-devel mailing list Koha-devel@lists.koha.org http://lists.koha.org/mailman/listinfo/koha-devel