[Catalyst] RFC for plugin to strip script name from URI; plugin name + code review

Bill Moseley moseley at hank.org
Sun Mar 30 13:47:41 BST 2008


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?

-- 
Bill Moseley
moseley at hank.org




More information about the Catalyst mailing list