Subject: | Don't initialize $PREFERRED_PARSER |
Currently $PREFERRED_PARSER is initialized in XML/Simple.pm (actually a no-op, as the value is undefined anyway):
$PREFERRED_PARSER = undef;
This is problematic if user code tries to set $XML::Simple::PREFERRED_PARSER before XML::Simple is loaded. In this case the initialization would nullify the user's setting. Some use cases:
$XML::Simple::PREFERRED_PARSER = '...';
require XML::Simple;
or
use Image::Info 'image_info';
$XML::Simple::PREFERRED_PARSER = '...';
image_info("image.svg"); # loads an XML parser (e.g. XML::Simple) on demand
Best to remove the line completely.