##
GET qr{^/=$} => sub {
print $q->header('text/html');
print $q->h1('REST API Documentation');
print $q->p('Here is a list of what you can do:');
####
my $regex = qr{^/=$};
my $coderef = sub {
print $q->header('text/html');
# etc.
};
GET( $regex, $coderef );
####
$code->();
exit;
####
GET qr{^/=/model/book/id/([\d-]+)$} => sub {
my $id = $1;
# etc.
####
http://localhost/script.cgi/=/model/book/id/10566