Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/perl/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Perl 此代码产生警告的原因:未初始化值的使用_Perl_Soaplite - Fatal编程技术网

Perl 此代码产生警告的原因:未初始化值的使用

Perl 此代码产生警告的原因:未初始化值的使用,perl,soaplite,Perl,Soaplite,此代码: my $url = 'http://172.27.1.250:8080/X/services/XSOAP'; my $soap = SOAP::Lite->new( service=> 'http://172.27.1.250:8080/X/services/XSOAP?wsdl', proxy => $url ); $soap->autotype(0)->readable(1); $soap->ns('http://www.ex

此代码:

my $url = 'http://172.27.1.250:8080/X/services/XSOAP';
my $soap = SOAP::Lite->new( 
    service=> 'http://172.27.1.250:8080/X/services/XSOAP?wsdl', 
    proxy => $url
);
$soap->autotype(0)->readable(1);
$soap->ns('http://www.example.org/X/');

my $som =  $soap->call('serviceX', 
           SOAP::Data->name('serviceXRequest')->value($value));
生成以下警告

在/home/user/perl5/lib/perl5/SOAP/Lite.pm行3396的字符串eq中使用未初始化值$ns


我应该怎么做才能在不消除警告的情况下消除它呢?

可能是因为SOAP::Lite希望$ns变量(一个XML名称空间标识符)有一个值,而您尚未设置该值

您最好的做法是查看第3396行,看看那里发生了什么


也许这是您的SOAP::Lite版本中的一个bug。您检查过模块的RT队列了吗?

您正在运行哪个版本的SOAP::Lite?能否在
SOAP::Lite->new(…)之后放置断点或打印语句?我想知道这个警告是否发生在物体的建造过程中。