package NuFone::Services; use Apache::Constants qw(OK DECLINED SERVER_ERROR); use DBI; use strict; sub handler { my $r = shift; my $content; (my $function = $r->uri) =~ s!^/!!; if ($function eq 'rock') { $content = "We will rock you"; } else { $content = "No soup for you"; } $r->send_http_header('text/plain'); $r->print("$content\n"); return OK; }; 1;