[Catalyst] uri_for method is returning relative URLs

Tomas Doran bobtfish at bobtfish.net
Tue Jan 17 18:04:35 GMT 2012

On 17 Jan 2012, at 17:43, Robert Rothenberg wrote:

> I have a Catalyst app that I have been working on with another  
> developer.
> In this application, the links in the templates use the uri_for  
> method, e.g.
>  <a href="[% c.uri_for('/login') %]">Login</a>
> This works fine on two machines that we have been developing on.
> I've recently installed it on a third machine with Perl 5.12.3 and  
> Catalyst
> 5.90007.  On that machine, the method seems to be returning relative  
> URLs,
> e.g. on the page "/login", c.uri_for("/logout") returns a link to
> "/login/logout" instead of "/logout".
> Has anybody seen this issue before?


Given you have two different machines which are behaving differently -  
try to make a minimal app which shows the difference?

This should just be catalyst.pl Foo and then adding one 5 line  

Then you can (more) easily work out why this is happening / what  
upgrade causes this.

Alternately - if it doesn't happen in the minimal app - it points to  
something deeper inside your app :).

We can (possibly) help debug more given more info - like the startup  
and request debug - but with no other info I can only offer generic  
suggestions, sorry!


More information about the Catalyst mailing list