Skip Menu |

This queue is for tickets about the Apache2-FakeRequest CPAN distribution.

Report information
The Basics
Id: 70699
Status: new
Priority: 0/
Queue: Apache2-FakeRequest

People
Owner: Nobody in particular
Requestors: joel.limardo [...] forwardphase.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: dir_config cannot be effectively used
Date: Fri, 2 Sep 2011 11:06:42 -0500
To: bug-Apache2-FakeRequest [...] rt.cpan.org
From: Joel Limardo <joel.limardo [...] forwardphase.com>
The Apache2 dir_config() method is listed in the @methods array but it accepts a parameter to return different results and therefore should not be included. According to the pod the module uses parameters included in the new() method to create a series of very simple methods that mainly just return strings, for example: my $req = Apache2::FakeRequest->new('hostname'=>'localhost'); A call to $req->hostname() shoudl return the string 'localhost'. Neat. But this doesn't make sense if the method accepts parameters and returns different values based on those parameters. Specifically, the dir_config() does not work in this sense because it expects a meaningful argument. It is easy enough to add a method called Apache2::FakeRequest::dir_config() to the script itself to handle the operation but I have to hack Apache2::FakeRequest to remove it from the @methods array because there is no standard way to tell Apache2::FakeRequest that I don't want it to utilize its default operation. I recommend that you, at minimum, remove dir_config (and any other method that accepts arguments) from the standard @methods array.