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.


In reply to Re: Running Perl5 in Browser by blazar
in thread Running Perl5 in Browser by neversaint

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.