well,
it depends on the application loader, not on the operating system.

a unix shell even if compiled for NT, (e.g. cygwin bash, mingw bash, msvc
tcsh, ...)
does look at the she-bang, also my apache for windows.
at least cmd.exe, 4nt.exe or command.com ignore the "she-bang" (#!) line.

some perl win32 startup magic is applied to get at the switches as aldo
said.
I also applied some 4nt magic to fire up the correct perl exe version.

set .pl=/usr/local/bin/perl5.005.exe
set .pl4=/usr/local/bin/perl5.004.exe
set .gpl=/usr/local/bin/guiperl.exe

"/" defaults to %SystemDrive% (which is E: in my case)

very similar to nt: ftype and assoc

but I had to version the various perl dll's as well. perl5.6 thanksfully
versions its dll now by default.
not so far as I do, but at least to some extent.
by "versioning" I mean rename the dll to something like perl5.00503-md.dll
(suffixes for multi-debug-object-threaded, ...).
this required some patches to the makefile, see my patches to the
perl-win32-porters list at lyris. (or p5p?)
this allows multiple versions through various small perl.exe versions
loading different shared libs.
Getting at the correct dll without needing to add the path to %PATH% was the
hard point.
switching various %PATH% settings was not to my taste.

BTW: the whole discussion should go to the lyris win32-users list and has
nothing to do with Win32::GUI

>Mike Kangas wrote:
>> on a Windows computer you do not need this. Linux yes. For
>> linux it is the path for perl, in windows it is just another
>> commented line of code.

Aldo wrote:
>not quite true.
>the Windows perl does not care about path, but it does care
>about switches. so if you put:
>
>      #!/usr/bin/perl -w
>
>the script will run even if your PC doesn't know nothing
>about /usr/bin, but it will run with warnings on ;-)



Reply via email to