# ex:ts=8 sw=4:
-# $OpenBSD: Subst.pm,v 1.22 2023/10/23 08:37:45 espie Exp $
+# $OpenBSD: Subst.pm,v 1.23 2023/10/23 19:45:28 tb Exp $
#
# Copyright (c) 2008 Marc Espie <espie@openbsd.org>
#
sub parse_option($self, $opt)
{
- if ($opt =~ m/^([^=+]+)(\+?)\=(.*)$/o) {
- my ($k, $plus, $v) = ($1, $2, $3);
+ if ($opt =~ m/^([^=]+)\=(.*)$/o) {
+ my ($k, $v) = ($1, $2);
$v =~ s/^\'(.*)\'$/$1/;
$v =~ s/^\"(.*)\"$/$1/;
- if ($plus && defined $self->{k}) {
- $self->{$k} .= " $v"):
- } else {
- $self->add($k, $v);
- }
+ $self->add($k, $v);
} else {
$self->add($opt, 1);
}