in reply to Re: setting server root HTTP::SERVER::Simple
in thread setting server root HTTP::SERVER::Simple
bless you, that is just what I needed. I now have this working
Having dynamic requestes be functions of the web server is probably not the best way to go about this, but it is working. Not sure what the best way of doing it is.sub handle_request { my ($self, $cgi) = @_; # is this an static request or dynamic # actions do not have a period as they are # functions of the webserver rather than files if($cgi->path_info() =~ /\./) { $self->serve_static($cgi,"c:\\appdir\\html"); } else { # ensure action exists or set it to default my $action = $cgi->path_info(); $action =~ s|^/||; if(! $self->can($action)) { $action = "home"; } $self->$action($cgi); } }
|
---|
In Section
Seekers of Perl Wisdom