Reading Re: Most specific pattern the other day reminded me of something I was thinking of a while back. It's an interesting question to consider what constitutes an external module, and what is part of perl?

Re: Disputation of g0n on the power and efficacy of XS makes an excellent point in this regard - is a module on CPAN part of perl, or is it open source software? I've always thought of CPAN modules as extra components that can be installed, but sometimes some of them make it into perl distributions. I think many of us would consider the strict pragma to be 'part of perl', but it isn't present in the copy of perl that ships with the Oracle 9i client (on AIX at least).

So that provides one possible distinction. It's 'part of perl' if it's included with the distribution. But then, what distribution? Many vendors ship a version of perl with their products (Oracle for example) but cut it down. So running a perl script on a machine with one of these products might fail for dependencies that we would expect to be present. Other distributions (Activestate for example) include components that are not part of the perl source, so do we consider these to be part of perl? Someone who habitually codes using one of these distributions might consider these 'popular modules' to be part of perl, simply because they are always there.

An alternative distinction is similar to the OS distinction between internal and external commands: commands that are part of the kernel, and commands that are separate executables stored in a pathed location. ls on unix for example is normally a separate executable (although you can get a listing of the files in the current working directory with echo *). (Hmm, TIMTOWDI,where have I heard that before?)

My feeling is that the boundaries of what constitutes 'perl' are amorphous and arguable. Does something become 'part of perl' when it's included in the interpreter? Shipped with the source code distribution? With Activestate? When it appears on CPAN?

I know that the facilities for extending and overloading in perl are perhaps not significantly greater than other languages, but having a single, open repository for reusable modules IMHO makes the distinction between a 'library' and 'part of the language' rather more vague.

So, would anyone care to put forward their take on it?

--------------------------------------------------------------

g0n, backpropagated monk


In reply to What constitutes 'perl'? by g0n

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.