0

I am developing a Firefox addon and I have a Perl script which I am using to perform a specific task. This Perl script needs to be called from the addon. What would be the best way to implement this? I was thinking of creating a socket program in perl (on my server) to listen for an incoming connection (from my addon) and then calling my required Perl script. But then how would I call this Perl script from the JavaScript in the Firefox addon? Also, is there any better way of achieving this?

1 Answer 1

1

The typical way to do this is to set up a proper web server with Perl CGI support, and use JavaScript and Ajax on the client side to call into your script.

There are plenty of resources online for both of these technologies.

Sign up to request clarification or add additional context in comments.

3 Comments

You should probably spell it out - XMLHttpRequest should be used in the add-on.
@Mat- Could you point out some good tutorials which discuss this.
CGI is an option. It has simplicity in its favour, but it also suffers from performance issues. Plack is the current favoured approach and should be at least looked at.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.