# SimpleApp CBB # This file uses the "Perlish" coding style # please read http://perl.4pro.net/perlish_coding_style.html ### DESCRIPTION ### # This is a CBB written to give a basic example # of a very simple application using just CGI::Builder. # This same application is available in other examples using also # other integrations such as Apache::CGI::Builder and # CGI::Builder::Magic # Please, check the other examples too, which will show how to use other # useful integration, in order to reduce coding and programming effort # Feel free to add more features to this CBB in order to better understand # the documentation ############ CBB START ########### # defines the CBB package ; package SimpleApp ########## BUILD INCLUSION ######### # with this statement this CBB will inherit the CBF capabilities # and methods. In this CBB, we don't need to include other extensions # or super classes ; use CGI::Builder ########## OVERRUNNING HANDLERS ########## # We need no overrunning handler for this very basic application ############## PER-PAGE HANDLERS ################ # These are the handlers called on a per page basis, # i.e. each per Page Handler is called ONLY for a certain requested page. # Unless you use some extension that sets the page_content on its own, # you usually need one PH_* handler per page in order to set the page_content # This CBB implements just the index and 2 page handlers # called when no page has been requested (i.e. no 'p' param defined) ; sub PH_index { my $s = shift ; my $Time = $s->Time() ; $s->page_content = << "EOS"
This page is the index (default) page of the application.
The following link will not show you the env_page (because of the SH_env_page), instead it will switch you to the pass_page regardless the URL
Go to page 'env_page'
This page is a sort of simplified login page. By filling the 'password' field with the correct password you can go to the 'env_page', while you will have this page displayed again if the password is wrong.
$$err{err_password}
| ENVIRONMENT | |
| $name | $value |