Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Running Perl5 in Browser

by neversaint (Deacon)
on Oct 17, 2006 at 14:33 UTC ( [id://578788]=perlquestion: print w/replies, xml ) Need Help??

neversaint has asked for the wisdom of the Perl Monks concerning the following question:

Dear Masters,

I was thrilled at finding a site for running Pugs online today.
I wonder if it is available for Perl5 as well.
Any link pointer would be greatly appreciated.

---
neversaint and everlastingly indebted.......

Replies are listed 'Best First'.
Re: Running Perl5 in Browser
by Fletch (Bishop) on Oct 17, 2006 at 16:51 UTC
Re: Running Perl5 in Browser
by blazar (Canon) on Oct 18, 2006 at 11:32 UTC
    Running Perl5 in Browser

    Reading below, that would be from a browser.

    I was thrilled at finding a site for running Pugs online today.

    Me too, in fact I've been pondering the same question as well.

    I wonder if it is available for Perl5 as well.

    Available I don't know. Feasible, certainly. Indeed the logic and the code is quite simple AJAX. But then there are possible security issues - to paste from http://feather.perl6.nl:8080/cgi-bin/runpugs:

    pugs> my $fh=open 'foo' :w *** Unsafe function 'Pugs::Internals::openFile' called under safe mode at <prelude> line 327, column 9-61

    Exactly this morning a friend told me about the logs for the Ruby equivalent, which showed every sort of attempt at a crack, including a "format c:" ;-)

    For a Perl 5 kinda thing one would probably use Safe.pm, but that's known not to bee bulletproof either, being mostly an afterthought than a straight design feature in the first place. Also what would you 'link' there, perl in debugger mode? Well, that's possible, but also quite limitative. Alternatively you may want a thing for people to paste in full scripts, or upload them, and then execute them on pressing a submit button, say. All in all, same old story: Safe.pm apart, how would you set the environment to be bulletproof secure nothwistanding possible leakages?

    Update: I've been /msg'd about seeing the logs for the ruby thing, as it would be funny to see them, but I don't know if they are available, however I googled a little and this page seems promising. Indeed it's funny to see the attempts and the comments.

Re: Running Perl5 in Browser
by arkturuz (Curate) on Oct 18, 2006 at 11:15 UTC
    Of course, the code you enter is not executed by the browser (as is written on the aforementioned page) the same way the JavaScript code is, but by the remote server (view source). There's client-side PerlScript if you want Perl in your browser, and it seems like fun.

Log In?
Username:
Password:

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

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

    No recent polls found