[Catalyst] RFC for plugin to strip script name from URI;
plugin name + code review
Ashley
apv at sedition.com
Sun Mar 30 18:25:43 BST 2008
On Mar 30, 2008, at 5:47 AM, Bill Moseley wrote:
> On Sat, Mar 29, 2008 at 11:27:39PM -0700, Ashley wrote:
>>
>> sub uri_for {
>> my $self = shift;
>> my $uri = $self->NEXT::uri_for(@_);
>> my $program_name = $self->config->{application_executable};
>> $uri =~ s,/\Q$program_name\E(?=/|\z),,;
>> return ref($uri) ? $uri : URI->new($uri);
>> }
>
> Wouldn't it be better to alter $c->req->base just once per request?
Der… yes, that sounds much better. Thanks.
-Ashley
More information about the Catalyst
mailing list