Re: What is this rule for?
- To: Debian Developers <debian-devel@lists.debian.org>
- Subject: Re: What is this rule for?
- From: Frank Lin PIAT <fpiat@klabs.be>
- Date: Sun, 11 Oct 2009 10:03:07 +0200
- Message-id: <[🔎] 1255248187.23651.76.camel@solid.paris.klabs.be>
- In-reply-to: <87k4zh4he2.fsf@windlord.stanford.edu>
- References: <20090929062143.GA5792@sumost.ca> <4AC1FA58.7080108@sunrise.ch> <87ws3h27j5.fsf@benfinney.id.au> <20090929161430.GB24034@gwolf.org> <4AC26FA2.5050009@sunrise.ch> <87k4zh4he2.fsf@windlord.stanford.edu>
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".
Franklin
[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...
http://docs.activestate.com/activeperl/5.8/faq/Windows/ActivePerl-Winfaq4.html#What_s_the_equivalent_of_the_she
Reply to: