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

Hello.. I am intrested in executing javascript within Perl-code. There is a Perl-module that might be useful (Javascript-0.52). Does anyone know of another module or a good way to get it done. The idea is to be able to extract links that are results of Javascript code, somewhat like a parsermodule.

Replies are listed 'Best First'.
Re: Javascript in Perl??
by Mr. Muskrat (Canon) on Apr 08, 2003 at 15:50 UTC

    After searching CPAN, it looks like the only contender is the JavaScript module - "Perl extension for executing embedded JavaScript" (but you already mentioned it). I cannot recommend it personally since I've never seen the need to use JavaScript in Perl. But you just want to extract links that are created with JavaScript. So I think that it should fit the bill.

    Of course, I would just write Perl code to mimic the functionality of the JavaScript.

    Update: removed references to JavaScript::Toolbox since it's not relevant.

Re: Javascript in Perl??
by PodMaster (Abbot) on Apr 09, 2003 at 06:54 UTC