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

Hi Monks
I have used Win32::IEAutomation and WWW:Mechanize and Win32::OLE.
Unfortunately, I'm now asked to port all scripts to LWP
I have IE and Firefox, I want to make the IE 7/Firefox, whichever useragent i use to be visible
while the script is executing
use LWP::UserAgent; my $ua = LWP::UserAgent->new(visible=>1); $ua->agent('Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1'); my $request = HTTP::Request->new(GET => $url); my $response = $ua->request($request); my $content = $response->content();
I saw through the LWP module code, didn't find anything related to making it visible.
Any idea on how to make the browser visible using LWP?
Raghu

Replies are listed 'Best First'.
Re: LWP UserAgent visible
by Corion (Patriarch) on Mar 20, 2009 at 11:48 UTC

    LWP::UserAgent does not use either Internet Explorer or Mozilla FireFox. The closest thing I know to showing the HTML page is through HTML::Display.

    But maybe I misunderstood your question and you can describe in more detail what you want to do instead of what you think is the solution.

Re: LWP UserAgent visible
by Sinistral (Monsignor) on Mar 20, 2009 at 12:29 UTC

    As corion says, LWP::UserAgent does not use a browser at all. The code itself acts like a browser, doing the low level communication to a web server. I checked the LWP::UserAgent man page, and 'visible' is not one of the options to the constructor. I didn't expect it to be, either, since there is nothing but Perl code running when you use the module.

    Why do you need to see a browser to process the response?