Tkx and xml-rpc

[email protected] (Kevin Walzer) Wed, 23 Jan 2013 09:59:35 -0500
Newsgroups perl.tcltk
Organization WordTech Communications LLC
Message-ID <[email protected]>
I'm wondering if there's a way to configure a Perl Tkx app to also serve 
as an XML-RPC server.

What I'm trying to accomplish is driving/scripting/sending messages to a 
running Perl Tkx app that causes the Tkx app to run an operation, and 
then return data to the client. The idea is to have the Tkx app serve in 
a similar capacity to a COM server (think Excel) on Windows or an 
AppleScriptable app on the Mac (think iTunes), which provide an 
interface for external commands, but in a more platform- and 
language-neutral way.

I'm currently using  the RPC::XML::Server, which seems perfect for my 
requirements in terms of simplicity but it seems that only one event 
loop can run at a time--Tkx or the XML::RPC server. That's not 
surprising, but I do wonder if there are any other CPAN modules that 
might serve here, or if there is a way to layer the XML::RPC bits over 
Tk's event loop.

Ruby has a module called "distributed Ruby" (drb) in its core that 
allows a Ruby program to send messages to a running instance of another 
Ruby program, even one running Tk; it's really cool. I'd love to see 
something similar in Perl, and suggestions are appreciated.

--Kevin


-- 
Kevin Walzer
Code by Kevin
http://www.codebykevin.com