【问题标题】:ActiveState PerlApp fails to compile the RPC::XML::Client moduleActiveState PerlApp 无法编译 RPC::XML::Client 模块
【发布时间】:2014-08-01 09:19:50
【问题描述】:

未编译的 .pl 运行起来就像一条烫伤的狗。编译后的版本抛出:

Can't locate object method "simple_request" via package "RPC::XML::Client::new: Unable to get RPC::XML::Parser object" (perhaps you forgot to load "RPC::XML::Client::new: Unable to get RPC::XML::Parser object"?)

还有代码:

#/usr/bin/perl

use strict;

use RPC::XML;

use RPC::XML::Client;

$VNEURL = "https://" . "$ConfIPHost" . "/api/";

$VNESession = RPC::XML::Client->new("$VNEURL", useragent => [ ssl_opts => {
                    verify_hostname => 0,
                    SSL_verify_mode => "SSL_VERIFY_NONE"
                    } ] );
$VNEAuthCookie = $VNESession->simple_request('login', 2, 0, $ConfIPUser, $ConfIPPass) or die("Failed to log in to IP360.");

【问题讨论】:

    标签: perl activestate perlapp


    【解决方案1】:

    在文档中,作者似乎这样做: require RPC::XML; require RPC::XML::Client;

    而不是“使用”。这可以解释为什么它在编译时不会为您运行,因为使用是在编译时评估的。

    【讨论】:

      猜你喜欢
      • 2012-02-25
      • 1970-01-01
      • 1970-01-01
      • 2015-07-31
      • 2016-01-13
      • 2011-08-31
      • 2015-02-21
      • 2018-04-10
      • 2019-03-19
      相关资源
      最近更新 更多