I too face this problem, and tried your hack above.

It works as long as I don't have to use the Authentication plugin. With Authentication plugin, it seems that any irregular mode that is protected by the plugin can never be displayed. Whenever you try to go to that mode, you get the login box, and even if you enter the right credentials, you get to the login box again.

I haven't quite figured out why yet, but I think it's because session state is transmitted by cookies, which themselves are transmitted through http headers. And the specific cookie headers generated by Authentication plugin are not available until AFTER the body has been generatied (the cookie headers are being generated by a postrun hook for some strange reason). In a standard runmode that doesn't matter, because the headers are prepended to the body before the whole thing is outputted. But with an irregular mode, you need to generate and print the headers before you generate and print the body.

Has anybody solved this problem?


In reply to Re^2: CGI::Application... flushing output to browser? by alain_desilets
in thread CGI::Application... flushing output to browser? by jfroebe

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.