X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fp5-CGI-Ex;a=blobdiff_plain;f=lib%2FCGI%2FEx%2FApp.pod;fp=lib%2FCGI%2FEx%2FApp.pod;h=e9f0888543f816610cbe8cec5ace480c8db9d34c;hp=536741bccad218d896733a2074ae9cf86f07ef6e;hb=6ab8b2e8e8388d1a238148a1ee58e124855f3768;hpb=fdecaac30a1168ed894c46d61b6c95524ec62a4e diff --git a/lib/CGI/Ex/App.pod b/lib/CGI/Ex/App.pod index 536741b..e9f0888 100644 --- a/lib/CGI/Ex/App.pod +++ b/lib/CGI/Ex/App.pod @@ -20,7 +20,7 @@ A basic example: return \ "Hello World!"; } -Well, you should put your content in an external file... +Properly put content in an external file... -------- File: /cgi-bin/my_cgi -------- @@ -38,7 +38,7 @@ Well, you should put your content in an external file... Hello World! -How about if we want to add substitutions... +Adding substitutions... -------- File: /cgi-bin/my_cgi -------- @@ -65,7 +65,7 @@ How about if we want to add substitutions... [% greeting %] World! ([% date %]) -How about a form with validation (inluding javascript validation)... +Add forms and validation (inluding javascript validation)... -------- File: /cgi-bin/my_cgi -------- @@ -976,6 +976,24 @@ possible to move some of those methods into an external package. See the discussions under the methods named "find_hook" and "run_hook" for more details. +Some hooks expect "magic" values to be replaced. Often they are +intuitive, but sometimes it is easy to forget. For example, the +finalize hook should return true (default) to indicate the step is +complete and false to indicate that it failed and the page should be +redisplayed. You can import a set of constants that allows for human +readible names. + + use CGI::Ex::App qw(:App__finalize); + OR + use MyAppPkg qw(:App__finalize); # if it is a subclass of CGI::Ex::App + +This would import the following constants: +App__finalize__failed_and_show_page (0), +App__finalize__finished_and_move_to_next_step => (1 - default), and +App__finalize__finished_but_show_page ("" - still false). These +constants are provided by CGI::Ex::App::Constants which also contains +more options for usage. + The following is the alphabetical list of methods and hooks. =over 4