Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
so my question is... Are there any other reasons that you might choose one exclusively over the other?

reasons you would want to use mod_perl:

  • you need to have access to other parts of the apache request cycle besides just content production. eg, you need to hook into the authentication layer or the logging layer.
  • your app will be hit frequently and needs to have low latency in the response.
  • your app would benefit from in-memory persistence.

reasons to stick to CGI:

  • it needs to be deployable on servers where mod_perl isn't available (of course, with Apache::Registry, you can still deploy any CGI script with mod_perl)
  • the app will not be hit very often and doesn't need to be very fast, but perhaps will consume a very large amount of memory when it is run. an example would be a CMS or weblog backend that publishes to static html. the 'publish' or 'rebuild site' part probably has to do a lot of work and could use a lot of memory for a big site, but will only be run every once in a while. if you run it under mod_perl, it will bloat the apache processes and you may run into memory problems. CGI has the advantage of giving up all its memory when it's done.

those are just some of the reasons that i've deployed one way or the other in the past. others can probably come up with other reasons.


In reply to Re: mod_perl or CGI.pm? by thraxil
in thread mod_perl or CGI.pm? by jfroebe

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-19 05:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found