my $tag = $cfg->val($database, 'import_xml_tag') || $type2tag{$type_base} || die "can't find which tag to use for type $type";
$config=XMLin($import_xml_file, ForceArray => [ $tag, 'config', 'format' ], ForceContent => 1 );
+ # check for broken XML::Simple
+ if ( XMLin('<foo><![CDATA[<bar>]]></foo>') eq '<bar>>' ) {
+ warn "XML::Simple on this system seems broken with <![CDATA[..]]>.\n";
+ map {
+ $config->{format}->{$_}->{content} =~ s#>$##;
+ } keys %{ $config->{format} };
+ }
+
# helper for progress bar
sub fmt_time {
my $t = shift || 0;