ActiveState PerlApp fails to compile the RPC::XML::Client module

170 views Asked by At

The uncompiled .pl runs like a scalded dog. The compiled version throws:

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"?)

And the code:

#/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.");
1

There are 1 answers

0
AgileDan On

In the documentation, the author appears to do: require RPC::XML; require RPC::XML::Client;

instead of 'use'. This would explain why it does not run for you when it is compiled, as use is evaluated at compile time.