Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: setting server root HTTP::SERVER::Simple

by blueberryCoffee (Scribe)
on Oct 09, 2006 at 18:37 UTC ( [id://577249]=note: print w/replies, xml ) Need Help??


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
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); } }
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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://577249]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-19 23:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found