My question is this: how do I write a multi-screen mod_perl program?

The same way you should have been writing it from the start ;D proper scoping and careful usage of globals ;)

See Practical mod_perl: 2.6.1. Porting Existing CGI Scripts to mod_perl

See also CGI to mod_perl Porting. mod_perl Coding guidelines

perhaps I am misunderstanding the use of handlers, or the configuration of mod_perl. What I would like to avoid is an entry in httpd.conf for every page (and this is where I think I might be misunderstanding something.).

Yes. Before mod_perl, I might start a program with a nice template (commentary on this template) like so:

#!/usr/bin/perl -- use strict; use warnings; use CGI; Main(@ARGV); exit(0); sub Main { ... # CGI program here }
After mod_perl all I need for a handler is to rename MyProgram.pl to MyProgram.pm, and rename Main to handler
package MyProgram; sub handler { CGI::initialize_globals(); # unneeded if using CGI->new ... # CGI program here }
Now, I might also use CGI::Application or Catalyst, so sub handler would consist of
MyApp->new->run;
or
Catalyst::ScriptRunner->run('MyApp', 'Apache');

In reply to Re: mod_perl question by Anonymous Monk
in thread mod_perl question by PyrexKidd

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.