Yes, mod_perl definitely can do that.

But if I were starting from scratch, I'd go the mod_fastcgi or mod_fcgid route. I really like CGI::Fast and find it's a convenient way to upgrade regular old CGI to the point of having persistence. It also means speed boosts that put perl up there with those other dynamic languages.

You can, of course, teach mod_perl to convert regular CGI to mod_perl CGI, but you have to then worry about things like your global my and global subs not working well together....

sub mod_perl_here { my $doesnt_work_like_you_expect = 7; sub sub_inside_sub_and_doesnt_look_like_it { print "$doesnt_work_like_you_expect <-- odd, it doesn't reinitiali +ze...\n"; } }

UPDATE: perrin, yes, I suppose that's true. I still say fastcgi is easier (or even better), unless you really need to get at the entire http protocol layer for some reason.

-Paul


In reply to Re: real object persistence by jettero
in thread real object persistence by mpapec

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.