diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2007-05-07 14:29:25 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2007-05-07 14:29:25 +0000 |
commit | da74bb838f9db7b451eccffe4a07eab0ded7ea27 (patch) | |
tree | b934ac3478f905adda4834e1eb94424e7c22cde1 | |
parent | a9f80b012eecbeae9ab6cc9fa2ec91107ec50611 (diff) |
cheap singleton for installed packages
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackageRepository.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm b/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm index c32b3e69bbf..fd7c977ee2f 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: PackageRepository.pm,v 1.18 2007/05/07 14:21:39 espie Exp $ +# $OpenBSD: PackageRepository.pm,v 1.19 2007/05/07 14:29:24 espie Exp $ # # Copyright (c) 2003-2006 Marc Espie <espie@openbsd.org> # @@ -237,9 +237,11 @@ package OpenBSD::PackageRepository::Installed; our @ISA=qw(OpenBSD::PackageRepository); use OpenBSD::PackageInfo; +my $singleton = bless {}, __PACKAGE__; + sub new { - bless {}, shift; + return $singleton; } sub find |