From: espie Date: Tue, 16 May 2023 14:31:54 +0000 (+0000) Subject: start un-exposing some internal methods X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=740eef27bf45559ae7b4214a89481cbdaf3d8a69;p=openbsd start un-exposing some internal methods --- diff --git a/usr.sbin/pkg_add/OpenBSD/IdCache.pm b/usr.sbin/pkg_add/OpenBSD/IdCache.pm index 78bd4c52d59..35324d954e0 100644 --- a/usr.sbin/pkg_add/OpenBSD/IdCache.pm +++ b/usr.sbin/pkg_add/OpenBSD/IdCache.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: IdCache.pm,v 1.10 2010/12/24 09:04:14 espie Exp $ +# $OpenBSD: IdCache.pm,v 1.11 2023/05/16 14:31:54 espie Exp $ # # Copyright (c) 2002-2005 Marc Espie # @@ -32,7 +32,7 @@ sub lookup if (defined $self->{$name}) { $r = $self->{$name}; } else { - $r = $self->convert($name); + $r = $self->_convert($name); if (!defined $r) { $r = $default; } @@ -59,7 +59,7 @@ sub lookup package OpenBSD::UidCache; our @ISA=qw(OpenBSD::IdCache); -sub convert +sub _convert { my @entry = getpwnam($_[1]); return @entry == 0 ? undef : $entry[2]; @@ -68,7 +68,7 @@ sub convert package OpenBSD::GidCache; our @ISA=qw(OpenBSD::IdCache); -sub convert +sub _convert { my @entry = getgrnam($_[1]); return @entry == 0 ? undef : $entry[2]; @@ -77,7 +77,7 @@ sub convert package OpenBSD::UnameCache; our @ISA=qw(OpenBSD::SimpleIdCache); -sub convert +sub _convert { return getpwuid($_[1]); } @@ -85,7 +85,7 @@ sub convert package OpenBSD::GnameCache; our @ISA=qw(OpenBSD::SimpleIdCache); -sub convert +sub _convert { return getgrgid($_[1]); }