Hangman::Application - A module containing the hangman logic
Hangman::Application is part of the simple hangman web application. The module contains all the logic and presentation for Hangman.
Hangman::Application
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.
$epoint
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::GuessWord object inside $self and that this is magically persistent between calls.
$self
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.
Hangman::Generator
Leon Brocard <leon@fotango.com>
Copyright (C) 2001, Fotango Ltd.
This module is free software; you can redistribute it or modify it under the same terms as Perl itself.
To install OpenFrame, copy and paste the appropriate command in to your terminal.
cpanm
cpanm OpenFrame
CPAN shell
perl -MCPAN -e shell install OpenFrame
For more information on module installation, please visit the detailed CPAN module installation guide.