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. |