summaryrefslogtreecommitdiffstats
path: root/scripts/Dpkg/Changelog/Entry.pm
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/Dpkg/Changelog/Entry.pm')
-rw-r--r--scripts/Dpkg/Changelog/Entry.pm16
1 files changed, 7 insertions, 9 deletions
diff --git a/scripts/Dpkg/Changelog/Entry.pm b/scripts/Dpkg/Changelog/Entry.pm
index e572909..d55e5fd 100644
--- a/scripts/Dpkg/Changelog/Entry.pm
+++ b/scripts/Dpkg/Changelog/Entry.pm
@@ -154,16 +154,14 @@ sub extend_part {
} else {
push @{$self->{$part}}, $value;
}
+ } elsif (defined $self->{$part}) {
+ if (ref($value)) {
+ $self->{$part} = [ $self->{$part}, @$value ];
+ } else {
+ $self->{$part} .= $value;
+ }
} else {
- if (defined($self->{$part})) {
- if (ref($value)) {
- $self->{$part} = [ $self->{$part}, @$value ];
- } else {
- $self->{$part} .= $value;
- }
- } else {
- $self->{$part} = $value;
- }
+ $self->{$part} = $value;
}
}