summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2023-05-27 10:08:26 +0000
committerMarc Espie <espie@cvs.openbsd.org>2023-05-27 10:08:26 +0000
commit881660f37f369344d7722314a58817d5d8d7eae3 (patch)
tree159d3ad7510a34417080cec937fee0e1d8f351db /usr.sbin
parent89a335f6042ef6f0dc1ec821d898cf72c632a305 (diff)
remove the extra local variable (blessing a ref to self DOES work)
accordingly zap the extra blocks that are no longer needed making this look less funky
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Vstat.pm17
1 files changed, 5 insertions, 12 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Vstat.pm b/usr.sbin/pkg_add/OpenBSD/Vstat.pm
index 0ddec077ffa..1046ca63eb6 100644
--- a/usr.sbin/pkg_add/OpenBSD/Vstat.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Vstat.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Vstat.pm,v 1.70 2022/03/17 21:45:52 espie Exp $
+# $OpenBSD: Vstat.pm,v 1.71 2023/05/27 10:08:25 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -24,11 +24,10 @@
use strict;
use warnings;
-{
package OpenBSD::Vstat::Object;
my $cache = {};
-my $x = undef;
-my $dummy = bless \$x, __PACKAGE__;
+my $dummy;
+$dummy = bless \$dummy, __PACKAGE__;
sub new
{
@@ -58,14 +57,12 @@ sub none
return OpenBSD::Vstat::Object::None->new;
}
-}
-{
package OpenBSD::Vstat::Object::None;
our @ISA = qw(OpenBSD::Vstat::Object);
-my $x = undef;
-my $none = bless \$x, __PACKAGE__;
+my $none;
+$none = bless \$none, __PACKAGE__;
sub exists
{
@@ -76,9 +73,7 @@ sub new
{
return $none;
}
-}
-{
package OpenBSD::Vstat::Object::Directory;
our @ISA = qw(OpenBSD::Vstat::Object);
@@ -98,8 +93,6 @@ sub exists
return OpenBSD::SharedItems::check_shared($self->{set}, $self->{o});
}
-}
-
package OpenBSD::Vstat;
use File::Basename;
use OpenBSD::Paths;