pperl looks very interesting, mod_perl for command the command line. can you use that to test modperl scripts?

Not really. If your modperl script is just "CGI on steroids" (still using the standard CGI interface) you test it by running it as plain CGI. If your modperl script is making use of Apache's internal interfaces, you have to have mod_perl to test it.

the reason i ask about the crons is if you have a lot of web servers all running multipe crons against a single db then a lot of connections can start to occur

I would say having a lot of crons on a lot of servers is rather a reason to not have persistant connections, because then you have a lot of persistent connections hanging around mostly idle. If you want all your cron jobs (on all servers) to share the same connection, you could move the logic into a mod_perl script that you poll via LWP as suggested by Perrin. This will probably not work very well if the query takes a lot of time.

How many servers are we talking here? Go with new connections every time. Chances are your database can handle it just fine. The actual queries are likely to place more of a burden on it than establishing the connections anyway.


In reply to Re^3: Command line Persistent DBI connections by Thilosophy
in thread Command line Persistent DBI connections by hakkr

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.