This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: B.20.1 bash question - paths sent to #!


Hi Al,

[...]
>I have 3 drives on my NT 4.0 system: C: D: E:.
>I have a perl script that has "#!/usr/bin/perl" in it.
[...]
>I am using ActiveState Perl.

I don't use AS Perl, but compiled the sources with VC++ myself.
So my configuration here is comparable to your's.

>
>Here is the situation.  First, my perl script is called "pop3", and it
>resides in /e/perl/bin.  If I put /e/perl/bin in my path, then I believe

I always have a shebang like "#!/usr/bin/perl -w" in all my perl
scripts.
I always add the directories containing my perl scripts to the path.

>that bash calls /usr/bin/perl with the file name as /e/perl/bin/pop3.
>However, AS Perl can't interpret this file name and gives a "file not found"
>error.
>
>I tried putting /perl/bin/ in my path, and this works, as long as I am "on"
>the e drive.  When I go to another drive, /perl/bin does not exist, and
>calling pop3 fails again.

You *have to* call your scripts with "perl -S
<scriptname_without_path>", even if you have added the directory to the
path.
If you don't want to do this, you would have to use the Cygwin version
of perl, which lacks a few very important modules, though.

>
>So what I'd like is to have bash convert the Posix path of the called script
>to win32 when using the #! syntax, so that AS Perl (and other interpreters)
>will have a path it can work with.  Is there a workaround?

You could write some wrapper script perhaps.

>
>I hope this makes sense.  Let me know if can clarify.
>-----------------
>Al and Patricia

Bye.
Michael.
-- 
Michael Hirmke           | Telefon +49 (911) 557999
Georg-Strobel-Strasse 81 | FAX     +49 (911) 557664
90489 Nuernberg          | E-Mail  mailto:mh@mike.franken.de
                         | WWW     http://aquarius.franken.de/

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]