Hello. I have written a Perl program that calls HTML::TreeBuilder to parse an HTML document. I want to connect this to a little VB program that has a tree-view control and a browser control. (I basically want to use this program to analyze and drill down on web pages.)
So, I need a mechanism to make a Perl object public to VB. Here is what I've rigged up so far:
1. VB program calls Perl program.
2. Perl program creates TreeBuilder object (actually a light wrapper around TreeBuilder).
3. Perl program uses HTTP::Deamon
to be a little web server, and it hooks up all requests to the TreeBuilder object.
4. VB program calls into Perl to get parsed out portions of the HTML file to fill up TreeView object. The VB program gets data from the Perl program my making HTTP GET requests with Microsoft's OpenURL call.
This scheme works, and it has a nice side advantage of allowing you to test the Perl code with a browser, but I'd really prefer a more lightweight scheme. Can some one propose a more direct IPC mechanism? The Perl and VB programs will always be on the same Windows box.