Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

A Perl Web Browser Plugin

by zentara (Cardinal)
on Dec 06, 2005 at 21:51 UTC ( [id://514649]=perlmeditation: print w/replies, xml ) Need Help??

Hi, this idea keeps going through my mind as something desirable.

Java has a plug_in to run it's code in Browsers, and I was wondering what the impediments were to making a Perl plugin (and of course graphics with Tk, and Gtk2).

So I'm just looking for brainstorming about this. There is Java and the java_plugin. They are not the same. What are the differences needed in the language to make it safe to run as a browser plug-in? You obviously need to remove access to the local filesystem, but what other considerations would be needed? Can Perl be chopped down, to be safe to run as a browser plug-in? Or is there something about Perl which makes it unsuitable as a browser-plug-in?


I'm not really a human, but I play one on earth. flash japh

Replies are listed 'Best First'.
Re: A Perl Web Browser Plugin
by wazoox (Prior) on Dec 06, 2005 at 22:15 UTC
    It certainly can be chopped down to make it a suitable browser plugin, because it was actually done : PerlScript is available for years, on IE only alas.
Re: A Perl Web Browser Plugin
by gjb (Vicar) on Dec 06, 2005 at 22:52 UTC

    The Java plugin doesn't just prohibit access to the local file system, the standard library has a very sophisticated mechanism of permissions in the java.security.* package. This allows for very fine-grained permissions that can be set via properties. I've actually used the latter to run students' code on my machine ;) This all goes down into the JVM which is aware of these permissions.

    To make a Perl plugin would probably mean a lot of work to build a perl interpreter that would support some kind of nontrivial security model.

    Just my 2 cents, -gjb-

      Safe::World?
        It was discussed recently on p5p list, how unsafe Safe.pm is... unfortunately.

        Best regards,
        Courage, the Cowardly Dog

Re: A Perl Web Browser Plugin
by randyk (Parson) on Dec 07, 2005 at 06:49 UTC

    The Penguin project is an effort towards enabling Perl code to be transferred and executed over a network. I'm not sure how far along that's been developed.

    Although more of a helper application rather than a plugin, I've worked on PAR-WebStart, which is a Perl implementation of Java's WebStart using PAR distributions. This doesn't have the security features of Java (save for a digital verification of the integrity of the transfer done via Module::Signature), but it does illustrate one way to launch perl applications through a browser.

      The Penguin Project article was interesting, and seemed to be heading in the right direction. Is it still active anywhere? Googling for it turns up alot of non-releated Penguin projects. :-)

      All I really want is to be able to run Tk or Gtk2 apps in a browser window, displaying network graphics and maybe a few buttons and animations. Essentially I want a free "Flash" replacement. :-)


      I'm not really a human, but I play one on earth. flash japh
        Note that this is a slight different from a Perl plug-in (and may not apply in your case), but since you say you essentially want a free Flash replacement, it's worth it to note that you can create Flash with Perl. It is a bit more cumbersome than using Tk, though.

Re: A Perl Web Browser Plugin
by choedebeck (Beadle) on Dec 07, 2005 at 16:00 UTC
    I seem to remember reading about the perl plus plugin that would allow you to run Tk Applications over a browser. I believe you can find it here
      Yeah, I've played with that PerlPlusPlugin, but it's almost useless because of the security problems, since it is a wrapper around the "real Perl and Tk" in your system. Hence, my original question, about how would you go about making a chopped down Perl and Tk, which would be loaded as a real browser plugin, AND not using the system's Perl.

      I'm not really a human, but I play one on earth. flash japh

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2025-11-18 10:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (72 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.