|
Interacting with forms is a common use for Perl in a web environment. But on forms with many buttons, the scripts must be written to do a great deal of work, often with special cases, just to decide what action to take with the form input. In this paper we will examine ways using Javascript or LWP to separate the processing of the script from the decision process to get there. Further we will see how to separate the processing from the display of the output to follow. By splitting these three functions into smaller scripts, the parts can focus on what they do best without the clutter of doing other functions as well. The resulting code is smaller, cleaner, and much easier to maintain.
|