note
jasonk
<code>
package MyApp::Controller::Root;
use strict; use warnings;
use parent 'Catalyst::Controller';
__PACKAGE__->config->{ 'namespace' } = '';
sub auto : Private {
my ( $self, $c ) = @_;
if ( $c->request->path !~ m{/$} ) {
$c->response->redirect( $c->request->path.'/' );
return 0;
}
return 1;
}
</code>
<p>I could have sworn there was a plugin out there to do this, but I can't seem to find it now...</p>
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-231445">
<hr>
<a href="http://www.jasonkohles.com/">www.jasonkohles.com</a><br>
<small>We're not surrounded, we're in a target-rich environment!</small><br>
</div></div>
727410
727410