http://qs321.pair.com?node_id=313471


in reply to LWP::UserAgent::FramesReady;

First of all, you should use LWP::UserAgent::FramesReady not LWP::UserAgent to construct the $ua.

my $ua = new LWP::UserAgent::FramesReady;

The result is not an HTTP::Response instance, rather a more appropriate HTTP::Response::Tree object since more than one page is fetched (The main page, the frames, sub-frames, etc...). It's pretty straight forward to get all the responses out with @responses = $response_tree->children();.

Replies are listed 'Best First'.
Re: Re: LWP::UserAgent::FramesReady;
by shockme (Chaplain) on Dec 09, 2003 at 19:45 UTC
    Wow. I guess the documentation is wrong:
    SYNOPSIS use LWP::UserAgent::FramesReady; $ua = new LWP::UserAgent; $response = $ua->request($http_request);

    But you are correct. It's working great now. Thanks!

    If things get any worse, I'll have to ask you to stop helping me.

      Please consider submitting a documentation patch, or at least letting Alan E Derhaag know about this.

      ciao ciao!

      -nuffin
      zz zZ Z Z #!perl
        Bug #4634 has been submmitted.

        If things get any worse, I'll have to ask you to stop helping me.

        Hi there, I'm also facing the same problem as the topic stater.
        When I add two line like suggested above

        @responses = $response_tree->children();
        print @responses;


        I get the folowing error:
        \Global symbol "@responses" requires explicit package name at ./test_grep.pl line 20.
        Global symbol "$response_tree" requires explicit package name at ./test_grep.pl line 20.
        Global symbol "@responses" requires explicit package name at ./test_grep.pl line 21.
        Execution of ./test_grep.pl aborted due to compilation errors.

        Which package name should I use?

        When I print $response->content;
        I also get the response that my browser doesn't support frames....
        the URL is http://www.dewestonline.cq-link.sr/

        Thanks in advance
        Albert