diff options
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Dependencies.pm | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Dependencies.pm b/usr.sbin/pkg_add/OpenBSD/Dependencies.pm index 33151d286eb..7052e36d227 100644 --- a/usr.sbin/pkg_add/OpenBSD/Dependencies.pm +++ b/usr.sbin/pkg_add/OpenBSD/Dependencies.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Dependencies.pm,v 1.118 2010/01/01 13:00:05 espie Exp $ +# $OpenBSD: Dependencies.pm,v 1.119 2010/01/04 00:14:31 espie Exp $ # # Copyright (c) 2005-2010 Marc Espie <espie@openbsd.org> # @@ -189,12 +189,19 @@ sub find_in_new_source } package _cache; + sub new { my ($class, $v) = @_; bless \$v, $class; } +sub pretty +{ + my $self = shift; + return ref($self)."(".$$self.")"; +} + package _cache::self; our @ISA=(qw(_cache)); sub do @@ -498,7 +505,8 @@ sub solve_dependency if (defined $global_cache->{$dep->{pattern}}) { $state->print("Global "); } - $state->say("Cache hit on $dep->{pattern}: ", ref($self->cached($dep))); + $state->say("Cache hit on $dep->{pattern}: ", + $self->cached($dep)->pretty); } $v = $self->cached($dep)->do($self, $state, $dep, $package); return $v if $v; |