in reply to avoiding excessive number of methods in CGI::Application and DBI modules
The param() method enables a very valuable system for customizing your applications on a per-instance basis. One Application Module might be instantiated by different Instance Scripts. Each Instance Script might set different values for a set of parameters. This allows similar applications to share a common code-base, but behave differently. For example, imagine a mail form application with a single Application Module, but multiple Instance Scripts. Each Instance Script might specify a different recipient. Another example would be a web bulletin boards system. There could be multiple boards, each with a different topic and set of administrators.Hope that helps!
The new() method provides a shortcut for specifying a number of run-time parameters at once. Internally, CGI::Application calls the param() method to set these properties. The param() method is a powerful tool for greatly increasing your application's re-usability.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: avoiding excessive number of methods in CGI::Application and DBI modules
by Tanktalus (Canon) on May 01, 2005 at 18:05 UTC |