Le Sam 02 Mai 2015 01:36:14, SHLOMIF a écrit :
Show quoted text> First of all, why are you using a lower libxml2 version than the one
> the distributed version was compiled against?
Yes, because of an important regression in the latest libxml2 version, which gives errors on valid XML documents that have external XML entities:
https://bugzilla.gnome.org/show_bug.cgi?id=737840
Show quoted text> Shouldn't it be the one packaged for the Linux distribution?
It is packaged, but I can't use it due to this regression (for which there seems to be no good workaround). And there is no versioned dependency (which would have avoided the automatic upgrade of XML::LibXML) because the new libxml2 library is entirely ABI-compatible with the old one.
Show quoted text> Secondly, I believe you can trap and override this warning using
> $SIG{__WARN__}.
This could be a workaround, but I would need to modify all my scripts.
Show quoted text> Finally though, I am open for a patch that disables this check if
> there's a package-scope variable set. E.g:
>
> ««««
> BEGIN { $XML::LibXML::disable_runtime_library_version_check = 1 ; }
> use XML::LibXML;
> »»»»
This would be better, but there would be the same problem: the need to modify all the scripts (if the variable is not set by default), unless there is also a way to do that globally, e.g. via a config file or an environment variable.
Now I'm wondering why there is such a check at all. Library versioning should take care of such version problems and give an error only when need be.