libcatalyst-plugin-smarturi-perl

Module providing configurable uris for catalyst
  https://metacpan.org/release/Catalyst-Plugin-SmartURI
  0
  no reviews



Configure whether $c->uri_for and $c->req->uri_with return absolute, hostless or relative uris, or uris based on the 'host' header. also allows configuring which uri class to use. works on application-wide or per-request basis.

catalyst::plugin::smarturi is useful in situations where you're for example, redirecting to a lighttpd from a firewall rule, instead of a real proxy, and you want your links and redirects to still work correctly.

to use your own uri class, just subclass uri::smarturi and set uri_class, or write a class that follows the same interface.

this plugin installs a custom $c->request_class, however it does so in a way that won't break if you've already set $c->request_class yourself, ie. by using catalyst::action::rest (thanks mst!).