From ba1b5d7ef2d3ea061510a37819cc9e07f2f31b93 Mon Sep 17 00:00:00 2001 From: espie Date: Sat, 27 May 2023 10:05:50 +0000 Subject: [PATCH] more descriptive comment --- usr.sbin/pkg_add/OpenBSD/Subst.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/pkg_add/OpenBSD/Subst.pm b/usr.sbin/pkg_add/OpenBSD/Subst.pm index cd667bd97ed..f863b37c943 100644 --- a/usr.sbin/pkg_add/OpenBSD/Subst.pm +++ b/usr.sbin/pkg_add/OpenBSD/Subst.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Subst.pm,v 1.18 2019/07/05 06:02:29 espie Exp $ +# $OpenBSD: Subst.pm,v 1.19 2023/05/27 10:05:50 espie Exp $ # # Copyright (c) 2008 Marc Espie # @@ -63,7 +63,7 @@ sub do { my $self = shift; my $s = shift; - return $s unless $s =~ m/\$/o; # optimization + return $s unless $s =~ m/\$/o; # no need to subst if no $ while ( my $k = ($s =~ m/\$\{([A-Za-z_][^\}]*)\}/o)[0] ) { my $v = $self->{$k}; unless ( defined $v ) { $v = "\$\\\{$k\}"; } -- 2.20.1