Hi All

first timer here :-)

I have an odd problem. I have written a perl module that I use to post data to an ESB. It uses LWP and HTTP::Request. I have a test unit that uses this and it works great. My first real use for this module was to do some processing within a cgi script (which happens to use cgi.pm). Once the processing is done, I call my module in order to post a message to the ESB, and then return OK to the browser. That's the theory. What happens in reality is that the call to the ESB hangs for about 10 seconds when called from within the CGI.

It seems like this may be due to STDIN/STDOUT redirection but I am not sure. I just cannot make it work and would appreciate some guidance.

Thx Z

In reply to Post within CGI by systemz64

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.