use strict; use warnings; use MVC::Neaf; MVC::Neaf->route( '/some/uri/path' => sub { my $request = shift; # ... query request object for params, cookies, etc # a valid way to return configurable error page die 403 if $perm_denied; # result will be fed to View's render() method # the user-agent will get a 200 page with some headers # and rendered content return \%hash; }, view => 'TT'); # more handlers MVC::Neaf->run; # end of the application (as in PSGI or Dancer)