Skip Menu |

This queue is for tickets about the Catalyst-Runtime CPAN distribution.

Report information
The Basics
Id: 35891
Status: rejected
Priority: 0/
Queue: Catalyst-Runtime

People
Owner: Nobody in particular
Requestors: darin.london [...] duke.edu
Cc:
AdminCc:

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



Subject: Catalyst::Test wishes
Date: Wed, 14 May 2008 16:36:19 -0400
To: bug-Catalyst-Runtime [...] rt.cpan.org
From: Darin London <darin.london [...] duke.edu>
Hi Catalyst developers, I just wanted you to know how awesome Catalyst is. I really enjoy developing with it. Just a couple of minor annoyances that I discovered today when I went to start using Catalyst::Test framework. First of all, I am using Catalyst version 5.7012 installed from CPAN on fedora-core 5 with perl 5.8.8 compiled from source to get around that stupid bug that popped up in the rpm version. I want to test against the site that I have written, which is hosted on an external server. The Catalyst::Test documentation states that there is a CATALYST_SERVER shell variable that I can set to force the Catalyst::Test::request method to use remote_request against that host instead of a local request against the MyApp object itself. However, when I did this, I noticed that the Catalyst::Utils::request method that is used by the Catalyst::Test::remote_request method uses a hard-coded 'http://localhost' value in the HTTP::Request object that it returns. I would have wanted this to test the presence of CATALYST_SERVER, and use that instead of localhost, as it precludes me from making a remote request against the server set in CATALYST_SERVER. I changed my version to work how I wanted it to work. In case you are interested here is a dif between the my new version of Catalyst::Utils and the original Catalyst::Utils 227,228c227 < my $host = ($ENV{CATALYST_SERVER}) ? $ENV{CATALYST_SERVER} : 'http://localhost'; < $request = URI->new( $host . $request ); --- Show quoted text
> $request = URI->new( 'http://localhost' . $request );
Once I made that change, I wanted to use a cookie to authenticate the test user against our system. However, I found that there was no way to override the agent that Catalyst::Test::remote_request uses. It looked as if it was thought that this would be possible, because there is an if ($agent) test before it is actually instantiated, but because the $agent variable is a my variable, it cannot be overridden in the caller using $Catalyst::Test::agent. I added a use vars qw($agent); and made the $agent an our variable, and now I can do this. Here is a diff between my Catalyst::Test and the original Catalyst::Test 9d8 < use vars qw($agent); 78c77 < our $agent; --- Show quoted text
> my $agent;
With this in place, I can set the CATALYST_SERVER shell variable, have the test code make its own $Catalyst::Test::agent, and then, and run the test using things like request('/'), request('/foo'), etc. Anyway, it would be nice if the code worked this way. Keep up the good work. Thanks, Darin London Duke University
Sorry, while your request may be valid, we would appreciate it if any feature enhancements would be sent to the catalyst-dev list so they can be open for discussion. Please feel free to pursue this issue there.
Subject: Re: [rt.cpan.org #35891] Catalyst::Test wishes
Date: Tue, 27 May 2008 08:52:20 -0400
To: bug-Catalyst-Runtime [...] rt.cpan.org
From: Darin London <darin.london [...] duke.edu>
Brian Cassidy via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=35891 > > > Sorry, while your request may be valid, we would appreciate it if any > feature enhancements would be sent to the catalyst-dev list so they can > be open for discussion. Please feel free to pursue this issue there. >
well, I dont really want to subscribe to another mailing list, and your system wont let me post to the list without subscribing. So, if you think it is valid, maybe you could post it to the list, and discuss it, and if it seems like something worth making doing to make the system work better, great. If not, oh well, no big deal. If you dont think its valid, just ignore it.
From: rt-cpan [...] trout.me.uk
Show quoted text
> well, I dont really want to subscribe to another mailing list, and your > system wont let me post to the list without subscribing.
The catalyst-dev list is very low traffic and exists specifically as a forum for the discussion of new feature development in Catalyst. This is because only the people directly involved in the packaging and releasing of Catalyst have access to rt.cpan, whereas all interested contributors are on the list. If you don't care about this feature sufficiently to be willing to discuss how it could be implemented (since your changes didn't come with tests I'm assuming it was purely a sketch rather than anything you expected to potentially be included in Catalyst itself) then it's not going to get implemented. Please don't reply to this ticket again since every time you do, you re-open it and it needs to stay rejected since this is not the forum for speculative feature proposals; it's a bug tracker.