Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

OpenBSD Package Manager in perl

by deprecated (Priest)
on Mar 19, 2001 at 04:26 UTC ( #65322=CUFP: print w/replies, xml ) Need Help??

Hello, Monks!

This is another case of perl making my life easier. First, I admit it. I am a racist. I cannot stand windows. I allow others to use it, but I will not tolerate my computers running it. So, when I found myself with an extra laptop and my girlfriend was asking to borrow it from me, I decided the only fair thing to do was install an almost unbreakable operating system, OpenBSD, and write some small scripts to automate it for her. She soon began getting into the UNIX way of life, and asking for software. She wasnt comfortable downloading compiling and installing stuff, and when I tried to explain the included package management software she sort of glazed over. I determined this was indeed a nail and I needed to write a script.

So what I have written is a pretty durn cool front end for BSD's package management system that allows you to search their packages and download packages you dont have, as well as (while superuser) install and remove packages with a textual menu that is half friendly.

This is a pre-beta-release and I am expecting bugs to be found, but the program is in use here and is working.

Pod is included, and the source is commented all over the place (despite knowing that Petruchio wont read them...).

Because it is larger than your average perlmonks node, it has been posted externally. Thanks go to scottstef for the http space.

Find me bugs, peers!

brother dep.

transcending "coolness" is what makes us cool.

Replies are listed 'Best First'.
Re: OpenBSD Package Manager in perl
by MeowChow (Vicar) on Mar 19, 2001 at 09:09 UTC
    I'd try it out but I don't have l^Hbsd. One initial reaction, upon glancing at the code, however, was that the following code could and probably should be transformed into a hash dispatch:
    if ($sel == 1) { show_installed() } elsif ($sel == 2) { show_available() } elsif ($sel == 3) { rgetpkglist() } ...
    Like so:
    my %dispatch = ( 1 => \&show_installed, 2 => \&show_available, 3 => \&rgetpkglist, ... } $dispatch{$sel}->();
                   s aamecha.s a..a\u$&owag.print

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: CUFP [id://65322]
Approved by root
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2021-01-27 19:51 GMT
Find Nodes?
    Voting Booth?