[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Installing modules.



At 17.17 -0400 1998.09.21, Vicki Brown wrote:
>At 15:14 -0400 98/09/21, Chris Nandor wrote:
>>
>> .plx is what I and others are using a lot for perl scripts, since .pl is
>> specifically meant for Perl library.
>
>"specifically meant for"?  By whom?  Documented where?  What programs
>assume this?

Well, specified primarily out of convention, similarly to .ph (Perl header
file).  But it is going to be specifically stated so in perlfaq, I believe.

A program should not assume it.  Tom and Randal say it is _absolutely
wrong_ to name a script with .pl.  I think that is silly; it is a
convention, and the only problem with it is that it confuses people.  How
do I know when I download this file that I am suppose to require() it or
do() it or run it?  If the person doesn't name the scripts ".pl", then I
don't have to worry about it.

It is similar to naming a subroutine with a leading _.  It is Bad to do
that for any non-private subroutine, just out of convention, but it is not
Wrong to do so.

As to .plx, this is gaining popularity, and was used as the extension for
docs in the Win32 Perl Resource Kit (from what I was told).


>.pm is documented as the expected ending for a perl module (you leave out
>the .pm in a "use" statement and Perl will supply it) and .ph is/was
>conventional (?  now deprecated?) for perl "headers" but where and when did
>.pl get picked up for a library?  A "library" in Perl 4 was just a script
>to include.  I always thought the .pl extension meant, simply, perl.
>Besides, I thought we didn't "do" plain ol vanilla libraries anymore. :-)

No, .pl was always meant to be Perl Library, from the beginning.  Ask any
longtime p5p'er, and they should tell you that, from what I understand.


>Continuing to use .pl as the suffix on my scripts...

It is not wrong, but it is certainly misleading, but you are under no
obligation to care.  :-)

--
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])