4 # $Id: sw.in,v 1.2 1999/07/30 20:24:02 mdw Exp $
6 # CGI interface for software installations
11 #----- Licensing notice -----------------------------------------------------
13 # This file is part of sw-tools.
15 # sw-tools is free software; you can redistribute it and/or modify
16 # it under the terms of the GNU General Public License as published by
17 # the Free Software Foundation; either version 2 of the License, or
18 # (at your option) any later version.
20 # sw-tools is distributed in the hope that it will be useful,
21 # but WITHOUT ANY WARRANTY; without even the implied warranty of
22 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 # GNU General Public License for more details.
25 # You should have received a copy of the GNU General Public License
26 # along with sw-tools; if not, write to the Free Software Foundation,
27 # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 #----- Revision history -----------------------------------------------------
32 # Revision 1.2 1999/07/30 20:24:02 mdw
33 # Fix titles for debugging actions.
35 # Revision 1.1 1999/07/30 18:46:38 mdw
36 # New CGI script for browsing installed software and documentation.
39 #----- Required packages ----------------------------------------------------
41 use lib qw(@pkgdatadir@);
48 use SWCGI qw(:DEFAULT :debug);
50 #----- Get packages implementing various actions ----------------------------
58 #----- Some built-in debugging actions --------------------------------------
67 $ACT{"show-config"} = sub { debug("configuration", %C); };
68 $ACT{"show-environment"} = sub { debug("environment", %ENV); };
69 $ACT{"show-query"} = sub { debug("query", %Q); };
71 #----- Snarf arguments ------------------------------------------------------
73 $C{"edited-config-file"} eq "yes" or
74 barf("Config file $C{datadir}/sw.conf hasn't been edited.");
77 $act = $Q{"act"} || "list";
81 barf("unknown action `$act'");
84 #----- That's all, folks ----------------------------------------------------