hackmare has asked for the wisdom of the Perl Monks concerning the following question:


I wonder.

I wander.

Has anyone any idea how I would tie in javascript or ecmascript into a perl/Tk application so that I can grab a javascript chunk out of an LWP-begotten XML chunk and interpret it?

Unfortunately there is no inline module for javascript yet (maybe that's what I'll have to build?) and all I can think of right now are the following options:

  1. Write an inline module for Javascript. Most rigorous, but dependant on other peoples' good will and free time.
  2. Parse and translate the javascript to perl. Less rigorous
  3. Tie in the Rhino JS interpreter inlined into Perl
  4. use a stand-alone interpreter such as NJS or equivalent.

Does anyone have any idea if any of this has been done before? Any leads/help would be greatly appreciated.