develooper Front page | perl.libwww | Postings from January 2001

XML_Client trashes LWP::UserAgent .. $ua->request. what's up doc?

Thread Next
From:
Robert
Date:
January 16, 2001 13:49
Subject:
XML_Client trashes LWP::UserAgent .. $ua->request. what's up doc?
Message ID:
005601c08005$4939f220$1a6001cb@chalmers.com.au


I have a situationj here where the following are set up in the scirpt first.
==========================
use strict;
use lib $PATH_LIB;
use CGI qw(:cgi-lib :all);
use OpenSRS::XML_Client qw(:default);

....... more code

# create a client object which we will use to connect to the OpenSRS server
$XML_Client = new OpenSRS::XML_Client(%OPENSRS);
$XML_Client->login;

...........more code

use HTTP::Request::Common;
use LWP::UserAgent;
$ua = LWP::UserAgent->new;
$ua->agent("Netscape/4.7 " . $ua->agent);

Now, when a subroutine is called to do the LWP bit,
I get this error message.
Can't call method "request" on an undefined value at
/usr/local/lib/perl5/site_perl/5.6.0/LWP/UserAgent.pm line 227.

IF I comment out the lines beginning with $XML, then the LWP part works. !!!

So what is it about the $XML_Client that is trashing the LWP handler?

bob


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About