I forgot another example of why someone may use C/XS that I've had experience with. One of my clients a few years ago had a Perl system that they deployed at client sites. The software was proprietary (ie. non-Open Source), but as we all know, there's no real way to obfuscate it so it's easily prone to theft and copying.

My client wanted a way to prevent this easy theft, so I suggested that we write some of the critical core components in C, compile it, then present it to Perl. That way, it's beyond trivial for the software to be stolen. Sure, the client could see all of the Perl code, but we didn't include the C library source, just the compiled shared library. Not perfect by any stretch, but pretty effective.


In reply to Re: XS Modules - why and when? by stevieb
in thread XS Modules - why and when? by Bod

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.