in reply to Re^8: Shortest/quickest way for Perl to take POST data it receives and send a POST request with this data to another URL?
in thread Shortest/quickest way for Perl to take POST data it receives and send a POST request with this data to another URL?
: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.
|
|---|