NAME - Fill-in-the-blanks funnythings for the Web


 David M. Chess,


    use Weblibs;

    # Initialize the titles and bodies (in practice,
    # these would be considerably longer!)
    $libarray = [
      { hinttitle => "Important Words",
        fulltitle => "Proverbs",
        body => "These are [plural noun] that try men's [plural noun].<br>
                 A [noun] saved is a penny [verb, past tense].<br>
                 Too many [plural noun] [verb] the [food item]."
      { hinttitle => "Poem",
        fulltitle => "That thing about ships",
        body => "I must go down to the [noun] again,<br>
                 To the [adjective] sea and the [noun].<br>
                 All I [verb] is a tall [noun],<br>
                 And a [noun] to [verb] her by."

    # Create a new set of Libs from it
    $ls = new Weblibs::Libset($libarray);

    # Tell it where the script is
    $ls->{scripturl} = "WeblibDriver.cgi";

    # Do a little tailoring
    $ls->{menutitle} = "Fred's Weblibs Page";
    $ls->{inputtitle} = "Fred's Weblibs -- &hinttitle;";
    $ls->{resulttitle} = "&fulltitle;";
    $ls->{result_intro_text} = "Here's what you've created!<p>\n";
    $ls->{inputbuttontext} = "GO!";

    # Print whatever the current CGI state calls for
    print $ls->getCgiPage();


The Weblibs package provides a Web/CGI-based interface to a set of amusing things, similar to the amusing things that constitute the popular ``Mad Libs'' paper-and-pencil party game.

(``Lib'', here, is pronounced to rhyme with ``bib'', and has no connection to the use of ``lib'', generally pronounced so as to rhyme with ``vibe'', and used as shorthand for ``library''.)

The Weblibs user is first presented with a menu of available Libs, described by vague and general descriptions, and