#!/usr/bin/perl -Tw # ShSc.cgi Daniel Brockman 070127 Display Short Course in basic Shell scripting # produces html pages. ################################################# # The author grants permission to use for any # # purpose, including copying and modification, # # provided the user acknowledges the author by # # name. (Creative Commons Attribution License # # http://creativecommons.org/licenses/by/2.5/ ) # # -- Daniel Brockman, author, 20070301 # ################################################# # BEGIN {@INC=(@INC,".")}; use strict; use Gallery; my $manifest="manifest.xml"; # list of picture files my $g = Gallery->new(manifest => $manifest); # instantiate gallery my $page; # init page to display my %arg=@ARGV; # pick up arguments #$g->gtest(); # test our interpretation of the parse #exit; # test #$page = 8; # test if (!$page) { # unassigned page? $page=$arg{page}; # get page arg, if any if (!$page) { # no arg provided? $page=1; # init to page 1 } } $g->whtml( page => $page ) ; # display the page #-----------------------------------------------------------------