I am trying to learn dancer and have run across the following problem. In my starter app after a user logs in I want to send them to a welcome page. For now I am just trying to send them back to the index page. However, I am having problems doing so with the following syntax.

I get:

Error 404 - Not Found

/index



  if ( passphrase( $input_hash->{Pswd} )->matches( $ctsn ) ) {

          redirect '/index';

   } else {

             return "Incorrect Unsername of Password\n";

   }