:P Any webdev doing CGI instead of PSGI is hurting his or her career and free time. And there was already zentara's answer, I was just adding to the bounty. The PSGI spec is simple too; easier and more consistent than the CGI spec. I think your photo analogy is funny but not on point. PSGI is the true utilitarian option and more like Legos than the kitchen sink.

Real world sidebar: I'm currently in the first week of what I expect to be about four weeks of rewriting some CGI code that was "sufficient" when it was written. The marathon rewrite is necessary to fix something that could have been addressed with one line of Plack middleware. One dev's sufficient is the next dev's WHY OH GOD WHY?! Perl is the poster child for technical debt because it's so easy to "Just Do It." I think posting alternative strategies benefits everyone and each can choose according to his or her own level of masochism. Double :P

Update: FTR, my code is a few lines shorter than the LWP example zentara gave, does more (meaning it's more verbose than necessary), and doesn't use the problematic CGI->Vars which joins multi-values with null bits which aren't considered/handled in the example.


In reply to Re^9: Shortest/quickest way for Perl to take POST data it receives and send a POST request with this data to another URL? by Your Mother
in thread Shortest/quickest way for Perl to take POST data it receives and send a POST request with this data to another URL? by tunafish

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.