in reply to Algorithm For Uninstalling Dependencies

can you come up with an algorithm that solves the problem?

Don't you simply need a postfix visitor?

sub uninstall { my ($pkg) = @_; return if !installed($pkg); uninstall($_) for get_dependencies($pkg); ... uninstall $pkg here ... }

Update: Ah, nevermind. That deletes dependencies that are still in use. Why would you want to do delete a dependency that's still in use? By that logic, uninstalling CGI::Simple should uninstall perl (strict's distribution).

Replies are listed 'Best First'.
Re^2: Algorithm For Uninstalling Dependencies
by JadeNB (Chaplain) on Nov 20, 2009 at 20:24 UTC
    Unless the ... uninstall $pkg here ... is more complicated than it seems, I think that this doesn't do what Limbic~Region wants: it will uninstall 'down', but not 'up'.
      Yeah, realized and updated while you were posting.