perl-XML::LibXML + global external entity loader

Just created a quick patch against perl XML::LibXML module, that adds global external entity loader support. Till now it was only possible to have per instance entity loader, but this is not enough if you want i.e., XML::LibXSLT to also use yours entity loader for imports, and input callbacks doesn’t suit all your needs.

Usage is simple:


where _entity_handler is subroutine like by option ext_ent_handler described in (

Note: when you define global entity loader, per instance entity loader is simply ignored.

You can download this patch  from Just download XML::LibXML from cpan, patch it and install. I’ll try to push it to CPAN if possible 😉