title: How can I structure CGI programs that move page to page?
body: <p>I have a general question about Perl CGI programs. For a few applications, not using MVCs, developers write CGI programs, may be using CGI.pm or some other way they like and for moving from screen to sceen, a new CGI program is written, (with - CVS TAGS, Perl headers etc etc..).</p>
  
  <p>But what I feel is if there is some stuff (subroutine or business logic) which is not required in other programs, I keep on calling same script with each page called based on one extra Role parameter. Benefit I get is one time header declaration, easy to maintain, </p>
  
  <pre><code>%frmData = CGI::Lite-&gt;parse_form_data();
  $Role    = $frmData{Role};
  if ($Role eq 'A'){ getPageFirst()}
  elsif ($Role eq 'B'){ getPageB()}  etc..
  </code></pre>
  
  <p>Is this a correct approach? Can we face some kind of problem. What will be the best approach?</p>