NAME

wordcounter - an application built using Navegante

SYNOPSIS

Build the application:

  $ navegante examples/wordcounter

Use the newly created file wordcounter as a CGI.

DESCRIPTION

This application behaves as a CGI and it counts the words being in the content being browsed. On every request we are using the live feedback option of our application banner to print the number of browsed words. Also, we are keeping track of the total of words being counted, we print this information when the user quits the application. The specific DSL section is:

  cginame(./wordcounter)
  formtitle(Word Counting Tool)
  proc(wcFunction)
  desc(wcDesc)
  init(wcInit)
  livefeedback(wcLive)
  quit(wcQuit)

VARIABLES

$current

This variable is used to keep count of words in every request.

FUNCTIONS

wcDesc

This function prints the description of the application. This is defined in the DSL by the desc statement.

wcFunction

This is the function that actually counts the number of words. This is defined in the DSL by the proc statement.

XXX - _loadit

wcLive

This is the function that prints the HTML that feeds the banner section for reporting information. This is defined in the DSL by the livefeedback statement.

wcInit

This function runs on the beginig of every request and it's used here to reset the word counter. This is defined in the DSL by the init statement.

wcQuit

The function that is called when the user follows the link to leave the application. This is defined in the DSL by the quit statement.

AUTHOR

Nuno Carvalho, smash@cpan.org

SEE ALSO

TODO