Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: possible: a perl plugin for web browsers?

by mr.dunstan (Monk)
on Aug 29, 2001 at 10:52 UTC ( [id://108702]=note: print w/replies, xml ) Need Help??


in reply to possible: a perl plugin for web browsers?

That's thinking outside-the-box baby!

Perl is good for lots of things, but I imagine it would be slow for event-driven stuff like in-browser features.

So, I ask your question with a question - what's the problem you're trying to solve? I think it would be extra fancy to have a perl-plugin browser type thing to help me build regular expressions - OR - to have perl's regular expression capabilities built into something that munges disconnected recordsets, client-side.

But I digress, I'm not sure that's the best tool for the job. Security is job one, definitely. So (hypothetically) what would warrant using perl on the client side, in a web application?

For the life of me, I can't think of it right now. Perl is great for a lot of things. Maybe an in-browser perl object editor would be something useful. Like some in-browser unit-testing device that lets you feed it regexp's and gives you a result based on some disconnected recordset. I have no idea. But I like your thinking!



-mr.dunstan
  • Comment on Re: possible: a perl plugin for web browsers?

Replies are listed 'Best First'.
Re: Re: possible: a perl plugin for web browsers?
by drfrog (Deacon) on Aug 29, 2001 at 23:31 UTC
    hey:
    one of the problems im trying to solve is in my last post
    java development is very expensive in terms of dev time and project budget

    and for eai
    perl could do things a lot faster
    and with less difficulty


    this site has java eai examples
    http://tecfa.unige.ch/guides/vrml/examples/eai/

    ok i havent tested these code pieces
    thoughoughly but check it out
    there are some differences in the way they currently work
    mostly because there is no activex/pluing for perl!!
    here is the java directory of code for changing rgb
    http://tecfa.unige.ch/guides/vrml/examples/eai/rgb-change/
    check out RGBChange.java its the core of it all
    there is an html page there you should be able to load if you hava a vrml plugin:
    say http://www.parallelgraphics.com/ plugin under windows

    here is the perl code
    # Very simple: just get the TouchSensor event and give # a random color to the other box. # NOTE - this does not work very well, at all!!!! Have # to figure out how best to fix it. JAS. $PORT=90000; use IO::Socket; $server = IO::Socket::INET->new(Proto => 'tcp', LocalPort => $PORT, Listen => SOMAXCONN, Reuse => 1) or die("Can't set up server"); system("perl /usr/bin/freewrl t1.wrl -best -eai localhost:$PORT eai &" +); $sock = $server->accept(); $sock->autoflush(1); sub getlines { print "jt1.pl getlines starting\n"; my @arr; for(1..$_[0]) { print "jt1.pl EXPECTING ROW $_\n"; my $str = <$sock>; chomp $str; print "jt1.pl GOT '$str'\n"; push @arr, $str; } print "jt1.pl returning from getlines @arr\n"; return @arr; } # Test the sample EAI protocol. $a = <$sock>; $sock->print("TJL EAI CLIENT 0.02\n"); $sock->print("1\nGN TS\n"); my @l = getlines(4); # print "\njt1.pl ok, REAL node of TS is $l[3]\n\n"; $sock->print("2\nGN MAT\n"); my @m = getlines(4); # print "\njt1.pl ok, node of MAT is $m[3]\n\n"; # print "jt1.pl SENDING 3 RL $l[3] TouchTime XX\n"; $sock->print("3\nRL $l[3] touchTime XX\n"); my @l2 = getlines(4); # print "jt1.pl - Touchtime returned @l2\n"; # XXX This is fragile - it breaks if user clicks quickly and two event +s # come before our response gets to them while(@x = getlines(3)) { print "jt1.pl in while loop with @x\n"; if($x[1] ne "XX") {die("Invalid ev '$x[1]'")} $sock->print("15\nSE $m[3] diffuseColor\n".(join ' ',map {rand +} 0..2)."\n"); #@y = getlines(4); #print "jt1.pl finishing while loop with @y\n"; }

    please keep in mind this is the first
    implementation of perl eai in freewrl
    no other vrml viewer/browser
    has the capability of running perl...yet

    hope that helps in understanding!


    back in the day we didnt have no old school

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (6)
As of 2024-04-23 06:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found