Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

My Perl filename dictionary project

by brian_d_foy (Abbot)
on Jul 02, 2004 at 14:36 UTC ( [id://371407]=perlmeditation: print w/replies, xml ) Need Help??

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 <bdfoy@cpan.org>

Replies are listed 'Best First'.
Re: My Perl filename dictionary project
by valdez (Monsignor) on Jul 02, 2004 at 17:20 UTC

    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

      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 <bdfoy@cpan.org>
Re: My Perl filename dictionary project
by BrowserUk (Patriarch) on Jul 02, 2004 at 20:56 UTC

    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.


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "Think for yourself!" - Abigail
    "Memory, processor, disk in that order on the hardware side. Algorithm, algoritm, algorithm on the code side." - tachyon
      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 <bdfoy@cpan.org>
Re: My Perl filename dictionary project
by l3nz (Friar) on Jul 02, 2004 at 16:36 UTC
    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?
      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 <bdfoy@cpan.org>
Re: My Perl filename dictionary project
by Joost (Canon) on Jul 09, 2004 at 00:01 UTC
    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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://371407]
Approved by Happy-the-monk
Front-paged by castaway
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (1)
As of 2024-04-24 14:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found