'type' => 'xpath',
'xpath' => "//Status",
'attrs' => [ qw/ISODate time date/ ],
+ 'optional_attrs' => [ qw/ISODate/ ],
'template' => "__date__",
'format' => 'one line',
'rewrite' => {
if $verbose;
return undef;
} else {
- warn "Unable to find any value for $key while looking at $block->{'name'}\n";
+ warn "Unable to find any value for $key while looking at $block->{'name'}\n"
+ if $verbose || ! grep /^$key$/, @{$block->{'optional_attrs'}};
next;
}
}