Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Algorithm For Uninstalling Dependencies

by ikegami (Patriarch)
on Nov 20, 2009 at 20:08 UTC ( [id://808517]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://808517]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (None)
    As of 2024-04-19 00:00 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found