http://www.perlmonks.org?node_id=1065251


in reply to Has anyone created, or is aware of a Perl editor, for "in page usage"?

Meditate upon this text from your original question:
Perl isn't... ClientSide, like JavaScript.
Pray tell me, if Perl does not run client-side, how will it run in the user's browser?

I suppose you could create a page containing an HTML textarea with the appropriate event handlers set so that every keystroke within that textarea uses AJAX to send the keypress (and probably also the full state of the textarea itself) so that Perl can be used to process the keystroke and send the result back to update the textarea, but dear god, why??? It would be horribly overcomplicated and I can't imagine that latency would be within the average user's tolerance, even if you were able to solve the issues that would inevitably arise when a new keystroke is sent before the result of the previous one has been received.

If and when WebSockets get broader acceptance, that could be improved on by essentially opening a telnet session to an editor on the server, which could be running in Perl. The persistent connection would help considerably with latency and sequencing issues, but it would still be less responsive than a client-side editor at least occasionally.

That's the only way I can think of to have an in-page editor that's run by Perl (even though it relies heavily on JavaScript/AJAX to get data to and from the server so that Perl can be run against it) without requiring the user to install a browser plugin containing a Perl engine.

As far as I'm aware, nobody has yet done this.

  • Comment on Re: Has anyone created, or is aware od a Perl editor, for "in page usage"?

Replies are listed 'Best First'.
Re^2: Has anyone created, or is aware od a Perl editor, for "in page usage"?
by Anonymous Monk on Dec 02, 2013 at 08:47 UTC

    ... AJAX ... As far as I'm aware, nobody has yet done this.

    Have you heard of Farabi? :)