{"id":4255,"date":"2014-03-30T09:27:57","date_gmt":"2014-03-30T09:27:57","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/how-can-one-manually-create-an-apache-request-object-collection-of-common-programming-errors\/"},"modified":"2014-03-30T09:27:57","modified_gmt":"2014-03-30T09:27:57","slug":"how-can-one-manually-create-an-apache-request-object-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/how-can-one-manually-create-an-apache-request-object-collection-of-common-programming-errors\/","title":{"rendered":"How can one manually create an Apache request object?-Collection of common programming errors"},"content":{"rendered":"<p>Is there a good API that would allow someone to create an object of <code>Apache<\/code> class?<\/p>\n<p>The class itself seems to lack a constructor; and synopsis wasn&#8217;t very helpful. My suspicion is that it&#8217;s somehow done via sublcass, e.g. <code>Apache::Request<\/code>?<\/p>\n<p>The context is I&#8217;m trying to write a test for a module which uses Embperl&#8217;s <code>$HTML::Embperl::req_rec<\/code> variable (more specifically, calls the <code>uri()<\/code> method on an object contained in it). The variable, upon examination, contains an object with <code>ref($req_rec) eq 'Apache'<\/code>.<\/p>\n<p><strong>NOTE<\/strong>: I&#8217;m specifically asking about constructing a REAL (though not necessarily fully functional) object. <strong>NOT<\/strong> mocking it (which I obviously easily can do and probably will end up doing anyway).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Is there a good API that would allow someone to create an object of Apache class? The class itself seems to lack a constructor; and synopsis wasn&#8217;t very helpful. My suspicion is that it&#8217;s somehow done via sublcass, e.g. Apache::Request? The context is I&#8217;m trying to write a test for a module which uses Embperl&#8217;s [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4255","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4255","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=4255"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4255\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4255"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4255"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4255"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}