3 ms·
Not that I know of. But it's so simple to hook input to an eval in Perl (or any dynamic language for that matter), that I've always wrote it myself. It can also
by ojosilva 15y ago
Not that I know of. But it's so simple to hook input to an eval in Perl (or any dynamic language for that matter), that I've always wrote it myself. It can also be implementation specific (preforking server, event-loop, dispatcher daemon...). I've used different approaches throughout the years:
- a controller action in Catalyst that listens at http://host/repl http://host/repl which evals the POST parameters. As a client, I use a simple admin-repl html page.
- in the main loop of a daemon script, a quick check for a row in a DB table or a special file in the server. When the server detects a new repl event, it evals the contents and writes the response back (either to the DB or to a file log).
- a 3 line AnyEvent::JSONRPC::Lite server that listens on a given local port for a string to eval. A matching JSONRPC client that calls that port with the repl string. I've used it to run scripts, and recently with a Corona-based Dancer app.
Maybe it could become a Plack::Middleware someday.