|go ahead... be a heretic|
Re^4: Does CGI::Application expose a HTTP::Request object?by isync (Hermit)
|on Aug 11, 2010 at 11:34 UTC||Need Help??|
1. Error on a first pass: "Can't call method "clone" on unblessed reference at /usr/share/perl5/HTTP/Message.pm line 32."
2. Shouldn't the %ENV variable names be mapped to the a-bit-different HTTP Header names?
3. And we are passing a hashref to the HTTP::Request constructor, but it expects an arrayref (solved via this node).
Result: After changing this, it works!
Any leftovers, hints, tweaks for this piece of code before I move it to production code? For example, a module for the ENV to HTTP Header translation, or similar improvements?
2c: A lengthy hack, isn't it? Just to get a HTTP::Response out of CGI.pm/CGI::Fast. Once more, I dislike this CGI.pm-behemoth..