I have a script which uses quite a few modules, including X11::IdleTime, which can detect idle time for X11 sessions. This module, in turn, uses Inline::C.

I'm trying to bundle my application up with PAR for easy distribution. I'm running the usual PAR commands, like:

pp -o hostloc hostloc.pl
but the resulting program doesn't work.

When I first ran it, I got this error:

The extension 'X11::IdleTime' is not properly installed in path: '/tmp/par-gifford/cache-e91f6197470cb6916bbd5973b10de787afb48eb7/inc +/lib' If this is a CPAN/distributed module, you may need to reinstall it on +your system. To allow Inline to compile the module in a temporary cache, simply rem +ove the Inline config option 'VERSION=' from the X11::IdleTime module. at -e line 874 INIT failed--call queue aborted at -e line 874, <DATA> line 1.
When I removed the VERSION= option from that module, I got this error instead:
Error. You have specified 'C' as an Inline programming language. I currently only know about the following languages: If you have installed a support module for this language, try deleting + the config file from the following Inline DIRECTORY, and run again: /home/gifford/src/HostLoc/_Inline at -e line 874 INIT failed--call queue aborted at -e line 874.

Is there any way to make PAR and Inline::C play nicely together?

I suspect I could solve the problem by rewriting X11::IdleTime in XS. Is there an easy way to convert Inline::C code to XS?

Thanks!


In reply to Packaging code using Inline::C with PAR by sgifford

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.