Yes, if you write your CGI with discipline, you can certainly get it to run unchanged under mod_perl. On the other hand, I've made the same observation about the CGI apps I've downloaded. Lots of people leave out the my's, skip the use strict;, and generally do things in a sloppy manner.

I'm sure I'll eventually download one and have it run under mod_perl without problems. But it's usually easier to just enable mod_cgi rather than debugging someone else's script.

As for developing from scratch, well, "limiting" myself to apache/mod_perl doesn't seem to be that big a loss.

YMMV, of course.

I'd be curious what you mean by "Aside from a few traps due to the way Apache::Registry namespaces compiled scripts". Are you referring to the way it treats modules with the same name found in different places in the directory structure as the same module? Quite a headache when you have 3 developers using the same webserver to work on the same app - 2 want the stable version of a module, 1 wants the version he's hacking on at the moment.

I've had trouble while debugging with mod_perl not picking up changes to modules without a webserver bounce (or setting MaxRequestsPerChild to 1). A couple of my coworkers actually have a

* * * * *    /usr/local/apache/bin/apachectl restart

cron job to work around this on their dev boxes.

ED

In reply to Re: Re: Re: How do you feel about mod_perl? by edebill
in thread How do you feel about mod_perl? by princepawn

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.