List applications with epoch, release and arch data.
If epoch is 0, don't store this as an empty string, but as
undefined, and don't output empty <epoch/> element in the XML.
foreach (@apps) {
$xml->startTag("application");
$xml->dataElement("name", $_->{name});
+ $xml->dataElement("epoch", $_->{epoch}) if defined $_->{epoch};
$xml->dataElement("version", $_->{version});
+ $xml->dataElement("release", $_->{release});
+ $xml->dataElement("arch", $_->{arch});
$xml->endTag("application");
}
$xml->endTag("applications");
foreach (@lines) {
if (m/^(.*) (.*) (.*) (.*) (.*)$/) {
my $epoch = $2;
- $epoch = "" if $epoch eq "(none)";
+ undef $epoch if $epoch eq "(none)";
my $app = {
name => $1,
epoch => $epoch,