If there was a way to do this in Tcl, you could do it through Tkx.
For some of our Perl programs we leveraged the Tcl-based event loop
for other file operations.  The interface between Tcl and Perl is very
tight, allowing you to call into each from the other.

Otherwise the idea of controlling something over a pipe (and have 2
separate processes) is a common unix paradigm, but you might still
have issues if the Perl side needs an event loop for it.

Jeff

On Wed, Jan 23, 2013 at 6:59 AM, Kevin Walzer <k...@codebykevin.com> wrote:
> 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

Reply via email to