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

Re: What is this rule for?

On Tue, 2009-09-29 at 13:37 -0700, Russ Allbery wrote:
> Andreas Tscharner <starfire@sunrise.ch> writes:
> > This is true for Unix/Posix systems, but unfortunately not for Windows
> > systems. And if the maintainer of a great Perl script wants his script
> > to work on both platforms, he'll probably will name it
> > GreatPerlScript.pl If the extension .pl is linked with a Perl
> > interpreter in Windows, he'll be able to run it on both systems without
> > a prepending "perl"
> If he names it GreatPerlScript on Unix and GreatPerlScript.pl on Windows,
> he'll be able to run it on both systems as GreatPerlScript.

This is another interesting point... Should we also preserve the
CamelCase names?
This is merely a decoration under Windows, but is important under $unix!
...just kidding.

Seriously, the developer had to[1] add a file extension to distribute
the file to windows, it doesn't means that such bad practice should be
carried-on on other platforms.

As an alternative to [1], if a perl/python/$language developer wants
windows users to be able to start a command easily, it is best to
provide a windows "foo.cmd" file which merely launch the interpreter and
command. As a benefit, the command can be launched by executing "foo".


[1] On doesn't actually "have to" specify the file extension. I can only
    speculate on why Python/Perl installer don't set PATHEXT properly...

Reply to: