[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-modperl
Subject:    Re: How best to get my mod_perl programs to run under CGI for non-mod_perl users?
From:       Perrin Harkins <perrin () elem ! com>
Date:       2012-12-17 16:38:04
Message-ID: CAC0_be38c3cwhsMUVR5ZvN5mcx9-2UFUjddbWVoa2E6b4O2=2A () mail ! gmail ! com
[Download RAW message or body]

Hi Chris,

One approach would be to modify your applications so they use some kind of
abstraction layer, like Plack, that runs on top of both CGI and mod_perl.
 There's more on Plack here: http://plackperl.org/

Another option, since you used Registry, would be to change your use of
Apache::Request to something like CGI.pm which works on both.  You may not
need to change much else.

- Perrin


On Sat, Dec 15, 2012 at 3:07 PM, Chris Bennett <chris@bennettconstruction.us
> wrote:

> Everything I use/write is strictly mod_perl (mod_perl-1.31 under
> OpenBSD).
>
> I am planning on releasing some of this open-source, but many users will
> not be running mod_perl.
>
> What might be the easiest way to go backwards to CGI without a huge
> amount of work?
> Should I write something that makes $r->print(); work as print?
> I have read that CGI.pm and Apache::Request are similar but not the
> same.
> Is something already written to do this out there? A guide?
>
> These applications use:
> use Apache::Request();
> use DBI();
>
> All of these modules are using Apache::Registry, not handler.
>
> Thanks,
> Chris Bennett
>
>

[Attachment #3 (text/html)]

 Hi Chris,<div><br></div><div>One approach would be to modify your applications so \
they use some kind of abstraction layer, like Plack, that runs on top of both CGI and \
mod_perl.  There&#39;s more on Plack here: <a href="http://plackperl.org/" \
target="_blank">http://plackperl.org/</a></div> <div><br></div><div>Another option, \
since you used Registry, would be to change your use of Apache::Request to something \
like CGI.pm which works on both.  You may not need to change much \
else.</div><div><br></div><div>- Perrin</div>


<div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Dec 15, 2012 at \
3:07 PM, Chris Bennett <span dir="ltr">&lt;<a \
href="mailto:chris@bennettconstruction.us" \
target="_blank">chris@bennettconstruction.us</a>&gt;</span> wrote:<br> <blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">Everything I use/write is strictly mod_perl (mod_perl-1.31 \
under<br> OpenBSD).<br>
<br>
I am planning on releasing some of this open-source, but many users will<br>
not be running mod_perl.<br>
<br>
What might be the easiest way to go backwards to CGI without a huge<br>
amount of work?<br>
Should I write something that makes $r-&gt;print(); work as print?<br>
I have read that CGI.pm and Apache::Request are similar but not the<br>
same.<br>
Is something already written to do this out there? A guide?<br>
<br>
These applications use:<br>
use Apache::Request();<br>
use DBI();<br>
<br>
All of these modules are using Apache::Registry, not handler.<br>
<br>
Thanks,<br>
Chris Bennett<br>
<br>
</blockquote></div><br></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic