![]() |
|
|
|||||||
![]() |
|
|
Thread Tools | Rate Thread |
|
|
PM User | #1 | |
|
Regular Coder ![]() Join Date: Oct 2005
Posts: 121
Thanks: 6
Thanked 0 Times in 0 Posts
![]() |
shebang and perl install directory in windows
So the shebang is there to find the location of the perl interpreter. I found this info:
Quote:
So the consensus is that I want the shebang to be #!usr/bin/perl. One solution is to reinstall perl in C:/usr. Are there any draw backs to this? Is there another way to get these results? manipulate the PATH or httpd.conf or something to alias usr/bin to C:/perl/bin? |
|
|
|
|
|
|
PM User | #2 |
|
Senior Coder ![]() Join Date: Mar 2006
Posts: 1,274
Thanks: 2
Thanked 39 Times in 38 Posts
![]() |
You can try it but you will need to completely uninstall perl if its already installed, reinstall it to the new directory and see how it works. But if the only reason is to avoid having to change the shebang line that is trivial. Changing a shebang line takes like 2 seconds.
|
|
|
|
|
|
PM User | #3 |
|
Moderator ![]() ![]() Join Date: May 2005
Location: Southern tip of Silicon Valley
Posts: 2,530
Thanks: 2
Thanked 96 Times in 92 Posts
![]() |
Windows doesn't use the shebang line to find the location of the perl interpreter. It uses the file type association, default being .pl but you can easily create an additional one for .cgi.
If you're using the apache web server, it can/will use the shebang line. However, when running apache on Windows, you can use the ScriptInterpreterSource directive to tell it to use the registry to find the location of the perl interpreter. Code:
<Directory "C:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin">
ScriptInterpreterSource Registry
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Rate This Thread | |
|
|