in reply to Calling a perl function from within a javascript function
First off, can I call a perl function from within a javascript functionWhy of course you can my good monk! This is perl after all where it's not uncommon to call on the power of quantum superpositions to perform a list operation. To do this will require the download and compilation of the JavaScript engine SpiderMonkey. Within the source package you should find the PerlConnect library which allows you to call both Perl in JavaScript and JavaScript in Perl (hmmm, time to implement Inline::JS methinks). Here's some example JS using PerlConnect
Unfortunately no browsers will have PerlConnect built into them (well I certainly hope not - security etc) so this won't be of much use to you I'm afraid, but I didn't want the Monastery to go uninformed of this possibility ;-)p = new Perl; p.use('Time::gmtime'); t = p.eval('Time::gmtime::gmtime'); // returns [49,0,4,24,6,98,5,204,0]
_________
broquaint
|
|---|