NAME
Hangman::Application - A module containing the hangman logic
DESCRIPTION
Hangman::Application
is part of the simple hangman web application. The module contains all the logic and presentation for Hangman.
Note that the application has two main entry points: the default() and the guess() subroutines. The $epoint
hash at the beginning of the module sets up the call to guess() if a "guess" parameter is passed in the request. Otherwise, default() is called.
Each entry point is given itself, the session, an abstract request, and per-application configuration. They then contain application logic - note that we store a Games::WordGuess object inside $self
and that this is magically persistent between calls.
This code is small and dirty as the output is generated inline using the CGI module and the add_body() method. Note that the output is stored inside $self
to be passed on to Hangman::Generator
.
AUTHOR
Leon Brocard <leon@fotango.com>
COPYRIGHT
Copyright (C) 2001, Fotango Ltd.
This module is free software; you can redistribute it or modify it under the same terms as Perl itself.