My Perl filename dictionary project
brian_d_foy
created: 2004-07-02 10:36:05

I want to create a dictionary of Perl files: what they are, who creates them, what they do, and so on. for instance, MANIFEST lists the files that should be in the distribution and is used by MakeMaker. Not only do I get to see some of the dark corners of Perl I don't know about, but people new to Perl can figure out what some of these files are (e.g. do you know why pm_to_blib or .packlist do or who created them?).

This has been a low priority project for a long time, but I've decided to simply make my list available and hope a lot of people send in file names and details I have not listed or don't know about.

This is going to continue to be a low priority project, but I'll collect names and details. Eventually I might have something to add to the Monastery.

--
brian d foy
Re: My Perl filename dictionary project
created: 2004-07-02 12:36:52
I am not sure I understand this correctly: are you talking about "standard" Perl file names or file names in a Perl distribution? (does not seem likely). Could you please explain it a little bit more thoroughly?
Re^2: My Perl filename dictionary project
created: 2004-07-02 15:20:01
My idea is that someone might look in this dictionary to see what a file is and how it was created. Some files one might see in a distribution and wonder what is does (e.g. test.pl), might show up as a developer snapshot (e.g. MANIFEST.SKIP), or might be a particular sort of file in a perl lib directory (e.g. the .al files that AutoSplit creates).

I'm documenting special file names, file extensions, and such that a Perl user may run into. I learn about these things by looking at source or watching things run, but I don't think everyone should have to do that.

--
brian d foy
Re: My Perl filename dictionary project
created: 2004-07-02 13:20:35

From a quick survey of my machine, I got this list:
Extensions:

*.pod
*.pot
*.la
*.po
*.ix
*.a
*.so
*.bs
Files:
autosplit.ix
LICENSE
SIGNATURE
AUTHORS
ChangeLog / CHANGES
CREDITS
How should it work? Will you propose something along the line of MANIFEST but for installed modules? Something that could be useful to uninstall packages? I haven't any experience on the behind the scene of Perl modules, I just got a CPAN id (btw, approved by you!). Any explanation will be welcome. update: added some files and corrected a typo.

Thanks, Valerio

Re^2: My Perl filename dictionary project
created: 2004-07-02 15:29:49
Thanks for the additions.

I'm not really proposing anything. It is just going to be a dictionary. If someone else wants to do something else, more power to them.

--
brian d foy
Re: My Perl filename dictionary project
created: 2004-07-02 16:56:42

I used this code

#! perl -slw
use strict;
use File::Find;

my %extns;

find( sub{ $extns{ lc($1) }++ if -f _ and m[\.([^\.]+?)$]; }, @ARGV );

print "$_ => $extns{ $_ }" for sort keys %extns;

to produce this list. I omitted the src directories, but include my packages directory where I build modules not available via PPM.

C:\Perl>p:371407 bin lib site packages
0 => 1
09d => 1
1 => 1
25 => 1
33 => 1
44 => 1
5 => 1
adjust => 1
al => 483
bak => 15
bat => 57
bpf => 5
bpg => 1
bpr => 5
bs => 136
c => 55
cfg => 7
cgi => 16
css => 1
cur => 1
cxx => 1
def => 6
dll => 139
e2x => 6
eg => 2
emf => 1
enc => 17
exe => 6
exists => 18
exp => 133
foo => 13
gif => 7
guess => 1
gz => 7
h => 218
html => 4
icon => 3
in => 4
inc => 1
inl => 22
iss => 1
ix => 30
ld => 3
lib => 138
libnet => 2
m => 20
m4 => 3
mak => 6
make => 1
makefile_pl => 1
mask => 3
mirror => 1
mms => 1
msg => 1
npuz => 1
obj => 17
old => 1
packlist => 65
pbi => 1
pc => 2
pdb => 19
perl => 2
pkg => 58
pl => 544
pm => 925
pm~ => 2
png => 2
pod => 292
ppd => 62
ppm => 1
ps => 1
pub => 1
self => 1
sgml => 1
sh => 2
skip => 1
sub => 1
t => 51
tar => 2
terms => 2
txt => 33
types => 1
uu => 2
vms => 1
wmf => 1
xbm => 12
xpm => 14
xs => 6
xst => 1
yml => 4
zip => 1

Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - [Abigail-II|Abigail]
"Memory, processor, disk in that order on the hardware side. Algorithm, algoritm, algorithm on the code side." - [tachyon]
Re^2: My Perl filename dictionary project
created: 2004-07-02 18:45:27
Thanks for the code. :)

The trick here is to know what those things mean, and although I'm not a Windows person, I'm guessing that most of those extensions are not interesting in this case. Extensions like zip, xpm, xbm, wmf, tar, sh, and many more off of my screen at the moment probably have their usual, non-perl significance.

I would certainly appreciate any Windows user who could pick out the file names and extensions particular to that OS, though.

--
brian d foy
Re: My Perl filename dictionary project
created: 2004-07-08 20:01:42
Hi Brian,

Your list is missing XS (and related) files: this is what's in my tree when I build an xs module:

Module.xs  xs source file
Module.c   generated from Module.xs
Module.o   generated from Module.c (?)
Module.so  generated from Module.o (?)
Module.bs  some 0 sized file
Module.h   C header file for Module (can also have other name)

typemap    conversion code from C datastructures to Perl and back
ppport.h   backward portability routines for the C API
           (generated by Devel::PPPort)

And then there's man pages: *.1p (for scripts) and *.3pm (for modules) that are usually generated from pod.

and pm_to_blib and .exists files that I think are there as markers for make.

perlmonks.org content © perlmonks.org and brian_d_foy, BrowserUk, Joost, l3nz, valdez

prlmnks.org © 2006 edmund von der burg (eccles & toad)

v 0.03