[cgiapp] CGI::Applicaiton and POE

Michael De Soto pronet at quarghost.com
Mon May 18 12:40:10 EDT 2009


Thanks Ron. Here's the postscript:

On Thu, May 7, 2009 at 6:04 AM, Ron Savage <ron at savage.net.au> wrote:
>
> Repeat after me: Do not go for maximum complexity

I hear you. I think this *is* a case of making things more complex by
than they actually are. Just not in the way you envisioned. I made
things complex by over thinking the problem. The solution, on the
other hand, was very straight forward.

All I had to do is write a wrapper around the
POE::Component::Client::DNS cookbook code. I put that wrapper in a
package outside of CGI::Applicaiton. I take input into CA the normal
way, untaint, and then pass it to the wrapper package. POE does it's
thing, and then passes it back to CA where I process the returned
values and then output to the user.

So what did I just describe? Oh yeah, it's a standard CGI::Application
application. What I assumed would be tricky to handle was really a
simple as pie. Or I should say POE.

Now I'm sure there's a better way to do it, or a faster way to do it,
but this seems to be the easiest way to do it. And I like easy.
Ideally I'd break off the POE part into it's own beast, as you
describe, and maybe have it run as a stand alone daemon -- but that
may be a longer term project. For now, easy is king.

Thanks for your advice.


More information about the cgiapp mailing list