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

Oh Monks:

I use the web a lot to do searching for patents, and literature related to patents. I've been using LWP::Mechanize to automate google searching and Patent Office retrievals, and I've been using HTML::Display to present the html results for easy viewing before I go on to process the reusults in perl.

It occurs to me that it would be nice to have a mirror function to HTML::Display that would allow me to use the browser I've first invoked to display information (using HTML::Display) to also act as a way of inputting what information I want to retrieve (using buttons and mouseclicks) and then have some way of sending that information on to perl. I.e., I'd like to pop up a browser to either display, to act as an interface for input to perl using the graphical inputs on the html code I write for the browser, or both. All of this would be to have the browser act to do perl I/O, an alternative to something like Perl/Tk.

Is this possible? Are there any modules that would handle this? I'm using the browser I'm invoking only for I/O, not for web access, so I don't know whether selenium or something like that would work ... any ideas would be most appreciated.

I should add that I'm agnostic about choice of browser or operating system, although probably Firefox and Ubuntu would be my preference.

-Eager Supplicant-
  • Comment on Using a browser as an interface to display and also submit info to perl

Replies are listed 'Best First'.
Re: Using a browser as an interface to display and also submit info to perl
by eosbuddy (Scribe) on Aug 31, 2008 at 18:42 UTC
    Is HTTP::Recorder the module you're looking for or have you already checked it off your list?
Re: Using a browser as an interface to display and also submit info to perl
by Your Mother (Archbishop) on Sep 01, 2008 at 00:33 UTC

    I suspect you mean WWW::Mechanize not LWP::Mechanize. The answer to Is this possible? is of course. You can do anything with Perl you like through a CGI interface. There are differences in the way permissions and data exchange happen but you could easily use a CGI to take parameters to make Mech requests and return the results to the browser however you like. Your question as it stands is awfully broad, though, and that's probably why you're not getting answers to your post.

    If you want to take a stab at a Mech request inside a CGI, or just a basic "hello world" CGI for starters, and come back for more, there are hundreds of links and posts here about how to do CGI. Try some super searches or tack a "site:perlmonks.com" onto a Google search.