In this:
{
no strict 'refs';
if (!keys %{"${parser_class}::"}) {
eval "use $parser_class $version;";
}
}
return $parser_class->new(@parser_params);
using XML::Filter::XSLT, "parser_class" is "XML::LibXML::SAX", and it does
not hit the eval code above because the keys "Builder::" and "Parser::"
exist even though the module is not loaded. Perhaps instead of keys, the
test should be $parser_class->can('new') (also, then you don't need "no
strict")?