[prev] [thread] [next] [lurker] [Date index for 2002/09/05]
Update of /cvsroot/siesta/siesta/cgi-bin In directory usw-pr-cvs1:/tmp/cvs-serv18996/cgi-bin Added Files: index.cgi Log Message: reorg --- NEW FILE: index.cgi --- #!/usr/bin/perl -w use strict; use CGI; use Template; use File::Find::Rule qw/find/; use Siesta::Storage::Table::Lists; my $cgi = new CGI(); print $cgi->header(); my $mode = $cgi->param('mode') || 'lists'; # hack my @dirs = map {"$_/Siesta/Plugin"} @INC; my @files = find (name => "*.pm", in => \@dirs); my @plugins; foreach my $file (@files) { $file =~ s!^.*[\\/](.+=?)\.pm!$1!i; push @plugins, { 'name' => $file }; } my $t_lists = Siesta::Storage::Table::Lists->new(); my @t_lists = $t_lists->retrieve_all(); my @lists; #foreach my $list (qw(siesta-dev siesta-commit)) foreach my $list (@t_lists) { #print STDERR $list->id(); push @lists, {'name' => $list}; } my $vars = { plugins => \@plugins, lists => \@lists, plugin => $cgi->param('plugin') || "", list => $cgi->param('list') || "", }; my $template = Template->new({ INCLUDE_PATH => './templates:', PRE_PROCESS => 'pre-config', }); $template->process($mode, $vars) || die $template->error(); exit 0;
Generated at 13:57 on 01 Jul 2004 by mariachi 0.52