Hi all,

I wanted to use 'pp' to build an "executable" for a little XML::RPC-Server using module RPC::XML::Server on a linux/debian server. Unfortunately I get an error, when the running service is going to execute a service function on request. Let's demonstrate this with a trivial example:

#!/usr/bin/perl -w
#
use strict;
use warnings;

use RPC::XML::Server;
use IO::Socket::INET;

use constant HOST => '10.0.0.1';
use constant PORT => 33000;

# Create the XML-RPC-server
my $daemon = RPC::XML::Server->new( host => HOST,
                                    port => PORT);


#-----------------------------------------------------------------------------
# adding service functions
#-----------------------------------------------------------------------------

# Add service function 'helloWorld'

$daemon->add_method({ name => 'helloWorld',
                      signature => ['string'],
                      code => \&helloWorld });


print "\n";
print "* \n";
print "* Starting Test Service \n";
print "* \n";

# Start up the server loop ...
$daemon->server_loop();





# ----------------------------------------------------------------------------
# Implementation of S E R V I C E  F U N C T I O N
# ----------------------------------------------------------------------------
sub helloWorld {
  my $srv = shift;

    return "Hello World";
}



Let's call this "myGeniusService.pl". It provides a function just returning "Hello World" on request. I build the executable by using the 'pp' script of the PAR::Packer package:

> pp -o myGeniusService myGeniusService.pl
> myGeniusService

*
* Starting Test Service
*

When a client requests 'helloWorld', the service terminates with the following error message:

Can't call method "parse" on an undefined value at blib/lib/RPC/XML/Server.pm (autosplit into blib/lib/auto/RPC/XML/Server/process_request.al) line 1765.

I am surprised about the appearance of _blib_ in the error message.

Does anybody know how to avoid this error message?

Thanks in advance,

Werner

Reply via email to