From 1f78b5ec306c36e5d900b7b564cc2e6072795d4a Mon Sep 17 00:00:00 2001 From: Marc Espie Date: Sat, 24 Apr 2010 09:27:16 +0000 Subject: simplify using //= --- usr.sbin/pkg_add/OpenBSD/Error.pm | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'usr.sbin/pkg_add') diff --git a/usr.sbin/pkg_add/OpenBSD/Error.pm b/usr.sbin/pkg_add/OpenBSD/Error.pm index 0816d4e0374..09b995bdd89 100644 --- a/usr.sbin/pkg_add/OpenBSD/Error.pm +++ b/usr.sbin/pkg_add/OpenBSD/Error.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Error.pm,v 1.23 2010/01/19 14:58:53 espie Exp $ +# $OpenBSD: Error.pm,v 1.24 2010/04/24 09:27:15 espie Exp $ # # Copyright (c) 2004-2010 Marc Espie # @@ -197,10 +197,7 @@ sub set_pkgname { my ($self, $pkgname) = @_; $self->{pkgname} = $pkgname; - if (!defined $self->{messages}->{$pkgname}) { - $self->{messages}->{$pkgname} = []; - } - $self->{output} = $self->{messages}->{$pkgname}; + $self->{output} = $self->{messages}->{$pkgname} //= []; } sub warn -- cgit v1.2.3