[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] I'm back! :-)



At 7:40 pm +0100 24.02.98, Mark Manning/Simulacron I wrote:
>Q:What's the difference between MacPerl and JavaScript?
>A:MacPerl works like it's supposed to.  :-)

Ouch. There's a nasty grain of truth in that. JavaScript is frustratingly
unpredictable and incompatible; no two implementations work (or rather fail
to work) in the same way.

> ... can I
>execute the MacPerl (or maybe I should say Perl but I've been trying
>this on the Mac) to execute on the client's machine?

Short answer: no.

Longer answer: I suppose that it would be theoretically possible. It would
require the client to have the necessary Perl interpreter etc. installed on
their box, plus - presumably - a browser plug-in to act as a go-between,
accepting the Perl from your server and handing it off to the interpreter.
Or you could embed the interpreter in the plug-in. In theory, one might be
able to do this (there was an article in MacTech a while back about writing
browser plug-ins and it looked less complicated than you might think,
although embedding a full Perl interpreter could be quite a trick). In
practice, I expect that most computationally-aware users would rather slash
open a major artery and then leap into a pond full of piranha fish than
accept and run arbitrary Perl code on their machines. I suppose there's
Safe and Penguin to limit the damage, but even so ... To quote from the
Blue Camel, p.361

	"You're placing yourself in the position of someone who
	 receives a mysterious device from a stranger with a
	 note that says 'Just hold this to your head and pull
	 the trigger.' Maybe you think it will dry your hair,
	 but you might not think so for very long."

> ... if I sent the
>Perl code back to my machine is there some way to secure the code so
>when it executes on my machine I'm not getting whacked by some hacker?

Penguin is designed to take care of things like that. See the Blue Camel
(aka Wall, Christiansen & Schwartz's "Programming Perl", second edition).

To summarize the above ramblings, you're not going to be able to execute
Perl code on someone else's computer without extensive preparation
beforehand, and there are good security reasons why they're likely to be
unwilling to let you do it. You may want to rethink the problem and look
for another solution.

	A

--
angus@pobox.com                                   http://pobox.com/~angus/

"There are a thousand forms of subversion, all of them interesting. But few,
 in my opinion, can equal the convenience and immediacy of the cream pie."
                                [Noel Godin]



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch