Roy Hills wrote: > I have two questions, which I hope that someone can help me with: > > 1. Are there any guidelines on file naming conventions for Perl scripts? > > In particular, should it be called "foo.pl", or just "foo"? Currently, I'm > using the latter naming convention, and include them with the following > line in Makefile.am: > > dist_bin_SCRIPTS = get-oui.pl arp-fingerprint.pl
You provided conflicting information. You said "the latter" which means you are distributing them as "foo" but your Makefile.am says that you are distributing them as "foo.pl". This confuses me. The implementation of an action should not be exposed to the users. If 'make' were written in perl would the user need to type in 'make.pl'? Then if the implementation were changed to ruby with *identical* functionality would we force all users to change how they call it and to type in 'make.rb'? Then if the implementation were changed to C would we then force the users to call it 'make.c'? I believe the implementation should be hidden from the user. It is an abstract data type. As a user I don't want to see it. For one larger example, the Debian Policy specifically says not to name files with implementation specific endings like .sh or .pl. (See section 10.4.) Best to avoid encoding the implementation in the name. Just call it 'foo'. I use this to my advantage. I edit foo.pl as the source file and have make generate foo and replace @VERSION@ and other variables in the script. By having different source and distributed files it gives me a nice way to expand variables easily. I used the automake documentation in section 8.1 Executable Scripts for a template. You can find the documenation here. info automake Scripts Bob