improvement suggestion for File::Find: pre-parsed extensions

M

Martijn Lievaart

_
Ted Zlatanov ([email protected]) wrote on VLVI September MCMXCIII in
<URL:__ On Thu, 05 Jul 2007 12:02:24
-0700 (e-mail address removed) (Randal L. Schwartz) wrote: __
__
__ RLS> This isn't Windows.
__
__ File::Basename runs everywhere and understands extensions (it calls
them __ suffixes).
__
__ Lots of software looks at file extensions. GNU Make and Emacs, for
__ example. Let's not forget Perl uses .pm for modules.


No they don't.

Yes, they do.

Make can transform .c files into .o files[1]. If your C source does not
end in .c, it will (probably[2]) not compile. Make does NOT look into the
file to guess the language the source is written in.

In Emacs, I can add some magic markers to tell what filetype it is. In
absence of these magic markings, Emacs looks at the ...... drum roll ....
extension.

Unix does not use extensions as extensively as Windows, but the are
certainly used.

M4

[1] Well the default rules do.
[2] You could call it .c++ or .C and have a fair chance of it compiling.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top