Inspired by Yet another question about GUIs for Perl, I'd be interested in monks' thoughts on XUL as a front end.

XUL is very much the flavour of the month in terms of interfaces. Anyone who's already got Mozilla or FireFox browsers has got the capability to run it already, plus there's an XUL Runner standalone. Installing procedures are established and the GIU looks entirely "native" as far as I can see.

But of course, because I'm asking here, you know I want to add Perl to the picture. There's no reason why an XUL application can't talk to a local executable file, Perl-based or anything else. But I can't understand the documentation here or here which talks about running local exectuables and communicating via sockets.

I can get the run command to my perl script and it seems to execute OK, but I don't see how to get any information back. For instance if I use the first example I can do process.run(false, args, args.length); and run my process successfully. But if my perl script prints "hello world" to STDOUT, I can't see how to do something like var perlOutput = process.run(false, args, args.length); and get it back into the XUL application for display or other coding.

Any ideas? Is the socket thing what I should be going for, or am I barking up the wrong tree? Should I ask elsewhere? My reasons for wanting to use Perl (apart from the obvious) is that I want to be able to read and write local files, which is still a pretty messy proposition as I understand it with XUL and JavaScript. Perhaps I'm wrong about that too?



($_='kkvvttuu bbooppuuiiffss qqffssmm iibbddllffss')
=~y~b-v~a-z~s; print

In reply to OT-ish: using XUL as a front end to Perl by Cody Pendant

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.