diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2010-01-04 00:14:32 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2010-01-04 00:14:32 +0000 |
commit | 725e243e8b92ee3bd723999ad07c97effb237ead (patch) | |
tree | b4b91be61b2f5f2c7fd39e7bfb180a86bc606153 /usr.sbin | |
parent | 6db143cb973314f5890d9de110c6ea760146bc51 (diff) |
better
Diffstat (limited to 'usr.sbin')
-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; |