#!/usr/bin/perl -w use strict; use warnings; use lib qw(./lib ../perllib); use CGI::Application::Dispatch; CGI::Application::Dispatch->dispatch( prefix => 'MyApp', table => [ '' => { app => 'Index', rm => 'start', }, 'user/:id?' => { prefix => 'MyApp::Index', app => 'User', rm => 'show', }, 'news/:id/:rm?' => { prefix => 'MyApp::Index', app => 'News', }, ], not_found => 'http://' . $ENV{HTTP_HOST}, );