Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: browser interface for local script

by Bro. Doug (Monk)
on Sep 30, 2006 at 13:44 UTC ( [id://575671]=note: print w/replies, xml ) Need Help??


in reply to browser interface for local script

HTTP::Simple is an excellent solution. I would also suggest launching your browser as your script executes, saving your user the step of launching. This way, from a single click, the user can launch the HTTP server, then launch the browser from the command line ( pointed to the correct page, of course ), then run the rest of the script and fill the page.

I bet your user would like that.

Bro. Doug :wq

Replies are listed 'Best First'.
Re^2: browser interface for local script
by blueberryCoffee (Scribe) on Oct 04, 2006 at 00:08 UTC
    Thanks, I used the following code:
    sub handle_request { my ($self, $cgi) = @_; my $action = $cgi->path_info(); $action =~ s|^/||; # ensure action exists or set it to default if(! $self->can($action)) { $action = "home"; } $self->$action($self, $cgi); #print $out Dumper(%ENV); }
    It is pretty neat. This makes it easy to use the MVC design pattern. I use HTML::Template to print all the pages out.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-03-29 10:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found