Perl

From OpenWetWare
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

CGI

Modules

CGI::Application

  • builds upon CGI adding a structure for writing truly reusable Web-applications
  • "run-mode" - single screen of an application
  • "Mode Parameter" is used to store (and retrieve) the current run-mode of your application
  • maps each run-mode to a specific Perl subroutine ("Run-Mode Method") that implements the behavior of a single run-mode
  • an "abstract class", and is only used via inheritance
package Your::Web::Application;
use base 'CGI::Application';
  • setup() method defines a map between run-modes and run-mode methods

References

CGI::Builder