Re: ActiveState Perl and Cygwin How To
On Sun, Feb 7, 2010 at 9:58 PM, Jeremy Bopp jer...@bopp.net wrote: raphael() wrote: The problem is that AS Perl cannot find the Perl script I invoke on the command line as the script's PATH that Cygwin reports to AS Perl is a unix one i.e. /cygdrive/c/cygwin/home/.../bin whereas AS Perl requires it in C:\cygwin\home\...\bin\. The Perl script is in PATH. This happens only with AS Perl (duh) as it requires backslash delimited path. I have searched somewhat on the web regarding this but haven't found anything. There are bash scripts that act in between and convert unix path to windows before invoking AS Perl but you still have to give it complete script path like $ bash_convert.sh /home/.../bin/perlscript.pl -h this will give C:\Perl\bin\perl.exe C:\cygwin\home\...\bin\perlscript.pl -h But what I want is that it should work directly like perlscr{TAB} {ENTER} and voilà working :) Any Ideas? The problem is that ActivePerl is a Windows program, and as such cannot use POSIX paths (/cygdrive/c/...) as produced by Cygwin. It has nothing to do with the slashes since Windows programs can use paths with either kind, even a mix, so long as they are Windows paths (C:\Program Files\...). You have two options available to you: 1) Use the cygpath program to convert the paths as needed so that you can send the paths to your scripts. e.g.) $ perl $(cygpath -w /path/to/myscript.pl) 2) Put your files into PATH and tell perl to find them for itself using the -S option. e.g.) $ perl -S myscript.pl With either option you can wrap the action you choose with another script or shell alias to hide what is actually going on so that you can get what you want when interacting with the shell. For instance, say you're going to take option 2, then you can do the following: $ alias myscript.pl=perl -S myscript.pl Then you can run it the way you wanted with tab completion. -Jeremy -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Thanks! Your ALIAS thing is wonderful though it escaped my mind. alias myscript.pl NICE ONE and thanks again. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: ActiveState Perl and Cygwin How To
On Sun, Feb 7, 2010 at 4:21 PM, raphael() wrote: Hello, I have been using Cygwin for quite some time now on Windows XP. I use Perl extensively and the scripts I use/create are fairly portable. I want to use ActiveState Perl as I can install many modules from CPAN that give me trouble in Cygwin using cpan install ... The problem is that AS Perl cannot find the Perl script I invoke on the command line as the script's PATH that Cygwin reports to AS Perl is a unix one i.e. /cygdrive/c/cygwin/home/.../bin whereas AS Perl requires it in C:\cygwin\home\...\bin\. The Perl script is in PATH. (snip) But what I want is that it should work directly like perlscr{TAB} {ENTER} and voilà working :) How about something like this: #!/bin/bash -x args=$(cygpath -w ${1+$@}) # $0 not passed through cygpath eval 'exec perl -x $0 ${args}' if 0; #! here begins the real perl -w use strict; $,=,; print $0 @ARGV; __END__ Csaba P.S. Can somebody explain what ${1+$@} does and why it's used instead of just $@ ? I hate doing cargo cult programming. -- Life is complex, with real and imaginary parts -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: ActiveState Perl and Cygwin How To
Csaba Raduly rcsaba at gmail.com writes: I have been using Cygwin for quite some time now on Windows XP. I use Perl extensively and the scripts I use/create are fairly portable. I want to use ActiveState Perl as I can install many modules from CPAN that give me trouble in Cygwin using cpan install ... Ultimately, it makes more sense to use Cygwin's perl with cygwin, rather than a third-party perl that doesn't understand cygwin. P.S. Can somebody explain what ${1+$@} does and why it's used instead of just $@ ? I hate doing cargo cult programming. http://www.gnu.org/software/autoconf/manual/autoconf.html#Shell-Substitutions which documents how use of ${1+$@} works around bugs in older zsh and ksh. Actually, modern ksh apparently still has a different bug, which it does not work around: http://lists.gnu.org/archive/html/automake-patches/2010-02/msg5.html so patches to the autoconf manual are welcome. But this is starting to stray (WAY) off-topic for cygwin. -- Eric Blake -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: ActiveState Perl and Cygwin How To
On Mon, Feb 8, 2010 at 4:42 PM, Eric Blake wrote: Csaba Raduly rcsaba at gmail.com writes: 8 snip 8 P.S. Can somebody explain what ${1+$@} does and why it's used instead of just $@ ? http://www.gnu.org/software/autoconf/manual/autoconf.html#Shell-Substitutions http://lists.gnu.org/archive/html/automake-patches/2010-02/msg5.html Thanks -- Life is complex, with real and imaginary parts -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: ActiveState Perl and Cygwin How To
raphael() schrieb: I have been using Cygwin for quite some time now on Windows XP. I use Perl extensively and the scripts I use/create are fairly portable. I want to use ActiveState Perl as I can install many modules from CPAN that give me trouble in Cygwin using cpan install ... The problem is that AS Perl cannot find the Perl script I invoke on the command line as the script's PATH that Cygwin reports to AS Perl is a unix one i.e. /cygdrive/c/cygwin/home/.../bin whereas AS Perl requires it in C:\cygwin\home\...\bin\. The Perl script is in PATH. This happens only with AS Perl (duh) as it requires backslash delimited path. I have searched somewhat on the web regarding this but haven't found anything. There are bash scripts that act in between and convert unix path to windows before invoking AS Perl but you still have to give it complete script path like $ bash_convert.sh /home/.../bin/perlscript.pl -h this will give C:\Perl\bin\perl.exe C:\cygwin\home\...\bin\perlscript.pl -h But what I want is that it should work directly like perlscr{TAB} {ENTER} and voilà working :) Any Ideas? Yes. Use AS Perl with your cmd.exe shell and cygwin perl with your cygwin shell. No conflicts, if you keep your PATH straight. Which cpan conflicts? AFAIK on cygwin pass much more CPAN modules than on AS Perl. With AS Perl you use ppm or ppm3, with cygwin perl cpan. -- Reini Urban -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: ActiveState Perl and Cygwin How To
raphael() wrote: The problem is that AS Perl cannot find the Perl script I invoke on the command line as the script's PATH that Cygwin reports to AS Perl is a unix one i.e. /cygdrive/c/cygwin/home/.../bin whereas AS Perl requires it in C:\cygwin\home\...\bin\. The Perl script is in PATH. This happens only with AS Perl (duh) as it requires backslash delimited path. I have searched somewhat on the web regarding this but haven't found anything. There are bash scripts that act in between and convert unix path to windows before invoking AS Perl but you still have to give it complete script path like $ bash_convert.sh /home/.../bin/perlscript.pl -h this will give C:\Perl\bin\perl.exe C:\cygwin\home\...\bin\perlscript.pl -h But what I want is that it should work directly like perlscr{TAB} {ENTER} and voilà working :) Any Ideas? The problem is that ActivePerl is a Windows program, and as such cannot use POSIX paths (/cygdrive/c/...) as produced by Cygwin. It has nothing to do with the slashes since Windows programs can use paths with either kind, even a mix, so long as they are Windows paths (C:\Program Files\...). You have two options available to you: 1) Use the cygpath program to convert the paths as needed so that you can send the paths to your scripts. e.g.) $ perl $(cygpath -w /path/to/myscript.pl) 2) Put your files into PATH and tell perl to find them for itself using the -S option. e.g.) $ perl -S myscript.pl With either option you can wrap the action you choose with another script or shell alias to hide what is actually going on so that you can get what you want when interacting with the shell. For instance, say you're going to take option 2, then you can do the following: $ alias myscript.pl=perl -S myscript.pl Then you can run it the way you wanted with tab completion. -Jeremy -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: activestate perl on cygwin
Kevin T Cella wrote: And what does #! look like? #! /usr/bin/perl Is there something that the space after the ! and before the / buys you? Readability. It is simply a question of style. I prefer the space. Has it come to that? Has it come to what? I simply asked a question. You provided an answer. Whose undies are in a bunch here? So your specifically saying by your shebang line - execute Cygwin's perl. As I state later, I use a symlink so I am infact executing Activestate perl. I guess it's style too but to me it just doesn't seem to make sense to point to one place then put a symlink in there to point to another place since you're hellbent on using ActiveState. Wouldn't it be much more stylistic and clear to simply point directly at the Perl you insist on using? Or did you really mean you are putting /usr/bin/perl in there to appear to be portable? That sort of answer I'd understand... except you have already stated that you don't care about portability. Seriously, are you trying to attack me or understand the problem? I am trying to be nice, I already apologized for my behavior earlier. My opinion on this situation does not require that I'm your friend. what does ls portion after #! in your script return? Before the conversion using cygpath, it returns the same as in the error: /home/kcella/bin/myscript.pl So then you are saying that you have no /usr/bin/perl? Is so then why do you put #! /usr/bin/perl in your script at all? I think I misunderstood the question. I had taken it to mean had I executed an ls on the incoming argument to my wrapper script (ie: the script filename), what would be the output. Now I see what you were trying to get at was if the interpreter referenced by the #! line exists on my system. As I state later, I use a symlink: $ ls -l /usr/bin/perl lrwxrwxrwx 1 kcella None 20 Jan 13 00:19 /usr/bin/perl - /c/Perl/bin/perl.exe Which is confusing. If you wish to use ActiveState then use ActiveState. If you wish to use Cygwin then use Cygwin. So now you are saying that you have no problem?!? Keep reading... The example I gave is for when I have no wrapper script and just create a symlink in /usr/bin/perl that points to /c/Perl/bin/perl.exe. Huh? There is no /c/... although I've heard of a way to do that I've also heard that it's not supported. Futher, why would you want to symlink /usr/bin/perl - /c/Perl/bin/perl.exe?!? Or, since you insist on using ActiveState, then why not specifically specify something like #!C:/Perl/bin/perl.exe or something like that? Again, it is just a question of style. And it's an answer of confusion. If I were to work on your script I would see /usr/bin/perl and think Great. He's using a standard perl and I should be able to easily use this under Linux or Cygwin's perl, etc. Wait... Err... No... He's symlinked this to ActiveState! and would be scratching my head wondering why you attempted to appear Unix-like with the shebang line yet are using a proprietary perl I have done it both ways, I prefer using linux style pahts. Which is why I still don't understand why you insist on ActiveState. Yes I know you said you want to use Win32 stuff but there's Win32 stuff that you could use in Cygwin too. If you really like Linux style paths, use Windows and Cygwin, seem to exert full control of the environment I would think using Cygwin's Perl, where you can more easily use Linux style paths not only for shebang but more conveniently throughout your script, would be something you'd want to do... BTW you never answered the question of what happens in ActiveState when you call setsid. I'll answer it for you. It returns Not implemented on this platform or something like that. IOW ActiveState does not implement nor support calling setsid. Why would you want setsid? It's useful in writing daemons, something I do on occasion. Along with that ActiveState doesn't seem to handle signals well. Forgive me here my memory is hazy as I had worked on this problem several years ago. I was attempting to write a daemon that would be essentially a Windows service and wanted it to be a multi threaded server meaning I wanted to fork and exec copies of myself to handle incoming requests. This requires proper signal handling. I was having problems with this so I queried in ActiveState forums and the guy responsible for signals in ActiveState responded that Windows doesn't support signals very well! Back to Cygwin's Perl I could call setsid as well as wrote a little test program that set, sent and trapped all 30 or so supported signals without a problem. So much for ActiveState! I mount c: to /c because it is much faster to type than /cygdrive/c/ and it makes more sense from a readability standpoint. I understand. Personally I use /dev because it's also short, is already there, seems to make sense to me that C is a device and allows me to have /dev/d, etc. However I realize it's non-standard and usually translate my usage
RE: activestate perl on cygwin
I simply asked a question. You provided an answer. Whose undies are in a bunch here? As did I. Sorry I misinterpreted your tone. Wouldn't it be much more stylistic and clear to simply point directly at the Perl you insist on using? Or did you really mean you are putting /usr/bin/perl in there to appear to be portable? That sort of answer I'd understand... except you have already stated that you don't care about portability. It is my opinion that it looks better. I'm sorry you disagree. Seriously, are you trying to attack me or understand the problem? I am trying to be nice, I already apologized for my behavior earlier. My opinion on this situation does not require that I'm your friend. I am not asking for friendship, just civility. And it's an answer of confusion. If I were to work on your script I would see /usr/bin/perl and think Great. He's using a standard perl and I should be able to easily use this under Linux or Cygwin's perl, etc. Wait... Err... No... He's symlinked this to ActiveState! and would be scratching my head wondering why you attempted to appear Unix-like with the shebang line yet are using a proprietary perl My scripts will not leave this computer. I have absolutely no intention of sharing any of my code. The only person who has to understand it is me. I'm sorry it confused you. I know you said you want to use Win32 stuff but there's Win32 stuff that you could use in Cygwin too. If you really like Linux style paths, use Windows and Cygwin, seem to exert full control of the environment I would think using Cygwin's Perl, where you can more easily use Linux style paths not only for shebang but more conveniently throughout your script, would be something you'd want to do... Agreed. In the long term it may happen, but not at this moment. BTW you never answered the question of what happens in ActiveState when you call setsid. I'll answer it for you. It returns Not implemented on this platform or something like that. IOW ActiveState does not implement nor support calling setsid. Why would you want setsid? It's useful in writing daemons, something I do on occasion. Along with that ActiveState doesn't seem to handle signals well. Forgive me here my memory is hazy as I had worked on this problem several years ago. I was attempting to write a daemon that would be essentially a Windows service and wanted it to be a multi threaded server meaning I wanted to fork and exec copies of myself to handle incoming requests. This requires proper signal handling. I was having problems with this so I queried in ActiveState forums and the guy responsible for signals in ActiveState responded that Windows doesn't support signals very well! Back to Cygwin's Perl I could call setsid as well as wrote a little test program that set, sent and trapped all 30 or so supported signals without a problem. So much for ActiveState! I will deal with it if an when I need to write a daemon script. Thanks for the information. You've come in here and asked a question to which you have been given an answer. You insist on mixing together to separate distinct technologies that were not designed to work together where experienced people here advise that you stop fighting the two use the technologies more in the way they were intended than in ways they weren't intended. Ah but you insist on doing it the hard way. Fine then, have fun with your problem is not an unreasonable nor should it be an unexpected response for you. I have already solved my problem, I will be using Mr. Peshansky's idea. You have been asking me questions ever since, I am simply trying to provide you with answers thereby extending to you the same courtesy others have on this thread. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
RE: activestate perl on cygwin
[snip] but the point of this little story is that you are short sighted if you believe that the only platform you'll encounter and thus need to deal with is Windows... I agree completely. This is for personal use. As has been pointed out to you already there is Win32 modules for Cygwin's Perl. Sorry, I missed that. Although this is thorough off topic, perhaps you can explain it better to me as I don't use ActiveState therefore I don't see what you are claiming. Exactly which full path is expanded to what and passed to (guess) ActiveState Perl interpreter as, again, what? Is it $0 that you speak of that may be a Cygwin path? I'm confused however if it is $0 then why couldn't that also be handled in the Perl script? The error is as follows: [~] $ myscript.pl Can't open perl script /home/kcella/bin/myscript.pl: No such file or directory [~] $ ls -l /home/kcella/bin/myscript.pl -rwxr-xr-x 1 kcella None 651 Jan 12 07:33 /home/kcella/bin/myscript.pl -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: activestate perl on cygwin
Kevin T Cella wrote: [snip] but the point of this little story is that you are short sighted if you believe that the only platform you'll encounter and thus need to deal with is Windows... I agree completely. This is for personal use. What does that matter? It's still short sited. Although this is thorough off topic, perhaps you can explain it better to me as I don't use ActiveState therefore I don't see what you are claiming. Exactly which full path is expanded to what and passed to (guess) ActiveState Perl interpreter as, again, what? Is it $0 that you speak of that may be a Cygwin path? I'm confused however if it is $0 then why couldn't that also be handled in the Perl script? The error is as follows: [~] $ myscript.pl Can't open perl script /home/kcella/bin/myscript.pl: No such file or directory [~] $ ls -l /home/kcella/bin/myscript.pl -rwxr-xr-x 1 kcella None 651 Jan 12 07:33 /home/kcella/bin/myscript.pl And what does #! look like? (And I'll ask for completion's sake as you never seems to be thorough nor accurate in your answers), what does ls portion after #! in your script return? Oh and what is PATH set to? And while we're at it, what is the exact path of the program you wanted to be executed (i.e. C:\Perl\bin\perl.exe?). -- Andrew DeFaria http://defaria.com Ever wonder what the speed of lightning would be if it didn't zigzag? -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
RE: activestate perl on cygwin
Kevin wrote: I still have no way to execute the command below and a regular script on cygwin using Activestate. Well, I run perl scripts on cygwin with no problem. Did not do anything special, except make sure NOT to install perl when installing cygwin(and making sure the activestate perl is in the path) -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
RE: activestate perl on cygwin
On Fri, 12 Jan 2007, Kevin T Cella wrote: Although this is thorough off topic, perhaps you can explain it better to me as I don't use ActiveState therefore I don't see what you are claiming. Exactly which full path is expanded to what and passed to (guess) ActiveState Perl interpreter as, again, what? Is it $0 that you speak of that may be a Cygwin path? I'm confused however if it is $0 then why couldn't that also be handled in the Perl script? The error is as follows: [~] $ myscript.pl Can't open perl script /home/kcella/bin/myscript.pl: No such file or directory [~] $ ls -l /home/kcella/bin/myscript.pl -rwxr-xr-x 1 kcella None 651 Jan 12 07:33 /home/kcella/bin/myscript.pl That particular case is handled by the wrapper script I posted. Note that you *don't* need to use the wrapper script to invoke perl on the command line -- only in the #! (shebang) line of your script file. Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] | [EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_Igor Peshansky, Ph.D. (name changed!) |,4- ) )-,_. ,\ ( `'-' old name: Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! Freedom is just another word for nothing left to lose... -- Janis Joplin -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
RE: activestate perl on cygwin
That particular case is handled by the wrapper script I posted. Note that you *don't* need to use the wrapper script to invoke perl on the command line -- only in the #! (shebang) line of your script file. I know. Thanks. I was just trying to oblige the request from Mr. DeFaria. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
RE: activestate perl on cygwin
Well, I run perl scripts on cygwin with no problem. Did not do anything special, except make sure NOT to install perl when installing cygwin(and making sure the activestate perl is in the path) I tried this, but it still does not work. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
RE: activestate perl on cygwin
What does that matter? It's still short sited. Yes, I don't disagree. Personally I do not care. I will deal with having to port something when it happens. And what does #! look like? #! /usr/bin/perl what does ls portion after #! in your script return? Before the conversion using cygpath, it returns the same as in the error: /home/kcella/bin/myscript.pl But I think, there is some confusion here. My script will correctly execute the program using Activestate perl. The example I gave is for when I have no wrapper script and just create a symlink in /usr/bin/perl that points to /c/Perl/bin/perl.exe. The root cause of the example is the reason for the initial post. The wrapper script was the solution I happened to choose to get around the path problem, but quickly found out that it does not work properly with: perl -e 'print join \n, @INC, \n;' Oh and what is PATH set to? /home/kcella/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/c/Perl/bin/:/c /WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: activestate perl on cygwin
Kevin T Cella wrote: And what does #! look like? #! /usr/bin/perl Is there something that the space after the ! and before the / buys you? So your specifically saying by your shebang line - execute Cygwin's perl. what does ls portion after #! in your script return? Before the conversion using cygpath, it returns the same as in the error: /home/kcella/bin/myscript.pl So then you are saying that you have no /usr/bin/perl? Is so then why do you put #! /usr/bin/perl in your script at all? But I think, there is some confusion here. My script will correctly execute the program using Activestate perl. So now you are saying that you have no problem?!? The example I gave is for when I have no wrapper script and just create a symlink in /usr/bin/perl that points to /c/Perl/bin/perl.exe. Huh? There is no /c/... although I've heard of a way to do that I've also heard that it's not supported. Futher, why would you want to symlink /usr/bin/perl - /c/Perl/bin/perl.exe?!? Or, since you insist on using ActiveState, then why not specifically specify something like #!C:/Perl/bin/perl.exe or something like that? The root cause of the example is the reason for the initial post. The wrapper script was the solution I happened to choose to get around the path problem, but quickly found out that it does not work properly with: perl -e 'print join \n, @INC, \n;' Oh and what is PATH set to? /home/kcella/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/c/Perl/bin/:/c /WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem You could probably also simply use #!perl since C:/Perl/bin is in your path... -- Andrew DeFaria http://defaria.com Anything worth fighting for is worth fighting dirty for. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
RE: activestate perl on cygwin
And what does #! look like? #! /usr/bin/perl Is there something that the space after the ! and before the / buys you? Readability. It is simply a question of style. I prefer the space. Has it come to that? So your specifically saying by your shebang line - execute Cygwin's perl. As I state later, I use a symlink so I am infact executing Activestate perl. Seriously, are you trying to attack me or understand the problem? I am trying to be nice, I already apologized for my behavior earlier. what does ls portion after #! in your script return? Before the conversion using cygpath, it returns the same as in the error: /home/kcella/bin/myscript.pl So then you are saying that you have no /usr/bin/perl? Is so then why do you put #! /usr/bin/perl in your script at all? I think I misunderstood the question. I had taken it to mean had I executed an ls on the incoming argument to my wrapper script (ie: the script filename), what would be the output. Now I see what you were trying to get at was if the interpreter referenced by the #! line exists on my system. As I state later, I use a symlink: $ ls -l /usr/bin/perl lrwxrwxrwx 1 kcella None 20 Jan 13 00:19 /usr/bin/perl - /c/Perl/bin/perl.exe So now you are saying that you have no problem?!? Keep reading... The example I gave is for when I have no wrapper script and just create a symlink in /usr/bin/perl that points to /c/Perl/bin/perl.exe. Huh? There is no /c/... although I've heard of a way to do that I've also heard that it's not supported. Futher, why would you want to symlink /usr/bin/perl - /c/Perl/bin/perl.exe?!? Or, since you insist on using ActiveState, then why not specifically specify something like #!C:/Perl/bin/perl.exe or something like that? Again, it is just a question of style. I have done it both ways, I prefer using linux style pahts. I mount c: to /c because it is much faster to type than /cygdrive/c/ and it makes more sense from a readability standpoint. The root cause of the example is the reason for the initial post. The wrapper script was the solution I happened to choose to get around the path problem, but quickly found out that it does not work properly with: perl -e 'print join \n, @INC, \n;' Oh and what is PATH set to? /home/kcella/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/c/Perl/bi n/:/c /WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem You could probably also simply use #!perl since C:/Perl/bin is in your path... Another question of style. Although for me it is more habitual than stylistic. Your questions are very subjective with an insulting tone. I'm sorry if I have offended you in some way. Do you at least understand Why the cygwin style paths are causing an issue? And what it is I am trying to accomplish? -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
RE: activestate perl on cygwin
But it is a bad idea to use ActiveState under Cygwin. Would you prefer if we lied to you? No, I'd prefer you answer my question. I can't use Activestate perl on cygwin by not using Activestate perl on cygwin. Do you see the contradiction? My scripts are written to make my life on Windows easier, so that means using Windows specific code to automate common tasks. But you really don't need to do such things in a Windows specific way! I used to run my whole domain under Cygwin. Apache for my web server, exim for a mail server, Cygwin's own inetutils for ftp, ssh, etc. Everything ran fine albeit a bit slower due to the fact that Cygwin is an emulation environment. Seeing as how you don't know what common tasks I am trying to automate, I don't see how you can presume to know the scripts do not have to be written in a Windows specific way. Suppose your theory is that any script written for Windows can be written to work with Linux. As I stated earlier, I do not wish to port my existing scripts to cygwin. And if the real, long term, more portable solution is to use a Cygwin based, thus more normal Perl... I'm asking for the short term solution. Answers were provided to you. Apparently they don't tickle your fancy. People have commented on that wrapper script that you posted. I still don't see what your problem is. If your Perl script expects C:\mydir\foo.dat then give it C:\mydir\foo.dat. Of course you'll need to do that under a cmd shell or, for Cygwin's bash shell you'll need to double the backslashes (C:\\mydir\\foo.dat) or use forward slashes (C:/mydir/foo.dat). If you insist on giving your Perl script /cygdrive/c/mydir/foo.dat then perhaps your Perl script should expect that and translate it. A quick Perl subroutine to do that shouldn't be that hard to code. Other posts have indicated how this is not possible. Executing a script That appears in my $PATH will automatically expand using cygwin style pathing. Answers were provided, but not to my original question. I still have no way to execute the command below and a regular script on cygwin using Activestate. perl -e 'print join \n, @INC, \n;' -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: activestate perl on cygwin
Kevin T Cella wrote: But it is a bad idea to use ActiveState under Cygwin. Would you prefer if we lied to you? No, I'd prefer you answer my question. Actually, being technical about this and looking at your OP there is no question there at all! Search for it. Look for a question mark. There is none. There is merely the sentence Please advise and that's what you got! I can't use Activestate perl on cygwin by not using Activestate perl on cygwin. Do you see the contradiction? I can't use this pair of pliers to tow this boat. Please advise. - Well how about cha use a tow instead? That aside, others have already addressed your unstated and off topic questions. Again, sorry you don't like the answers you got and have fun with your pliers. My scripts are written to make my life on Windows easier, so that means using Windows specific code to automate common tasks. But you really don't need to do such things in a Windows specific way! I used to run my whole domain under Cygwin. Apache for my web server, exim for a mail server, Cygwin's own inetutils for ftp, ssh, etc. Everything ran fine albeit a bit slower due to the fact that Cygwin is an emulation environment. Seeing as how you don't know what common tasks I am trying to automate, I don't see how you can presume to know the scripts do not have to be written in a Windows specific way. It's pretty much a given unless you simply insist on doing it in a Windows specific way. Suppose your theory is that any script written for Windows can be written to work with Linux. As I stated earlier, I do not wish to port my existing scripts to cygwin. Then have fun with your little problem there bud. And if the real, long term, more portable solution is to use a Cygwin based, thus more normal Perl... I'm asking for the short term solution. I gave you an answer for your short term solution. If you insist on using a Windows oriented product such as ActiveState then fire up cmd and type in Windows specific path names to your Windows only ActiveState Perl scripts. Where's the problem? Answers were provided to you. Apparently they don't tickle your fancy. People have commented on that wrapper script that you posted. I still don't see what your problem is. If your Perl script expects C:\mydir\foo.dat then give it C:\mydir\foo.dat. Of course you'll need to do that under a cmd shell or, for Cygwin's bash shell you'll need to double the backslashes (C:\\mydir\\foo.dat) or use forward slashes (C:/mydir/foo.dat). If you insist on giving your Perl script /cygdrive/c/mydir/foo.dat then perhaps your Perl script should expect that and translate it. A quick Perl subroutine to do that shouldn't be that hard to code. Other posts have indicated how this is not possible. Funny I do it every day. Executing a script That appears in my $PATH will automatically expand using cygwin style pathing. This statement doesn't even make sense. What exactly is expanding? If you type myscript.pl 'C:\\Cygwin\\tmp\\file' and myscript.pl echoes out the first arg what do *you* get? Answers were provided, but not to my original question. I still have no way to execute the command below and a regular script on cygwin using Activestate. perl -e 'print join \n, @INC, \n;' Maybe you should ask ActiveState... -- Andrew DeFaria http://defaria.com Hang up and drive. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
RE: activestate perl on cygwin
On Thu, 11 Jan 2007, Kevin T Cella wrote: [snip] I'm asking for the short term solution. Answers were provided to you. Apparently they don't tickle your fancy. People have commented on that wrapper script that you posted. I still don't see what your problem is. If your Perl script expects C:\mydir\foo.dat then give it C:\mydir\foo.dat. Of course you'll need to do that under a cmd shell or, for Cygwin's bash shell you'll need to double the backslashes (C:\\mydir\\foo.dat) or use forward slashes (C:/mydir/foo.dat). If you insist on giving your Perl script /cygdrive/c/mydir/foo.dat then perhaps your Perl script should expect that and translate it. A quick Perl subroutine to do that shouldn't be that hard to code. Other posts have indicated how this is not possible. Executing a script That appears in my $PATH will automatically expand using cygwin style pathing. Answers were provided, but not to my original question. I still have no way to execute the command below and a regular script on cygwin using Activestate. perl -e 'print join \n, @INC, \n;' As you've noted yourself in the paragraph above, you only need the wrapper script to transform the script name from POSIX path style to Win32 style, and only if it's in the #! (shebang) line of a perl script. That was what my wrapper script was designed to do (as shown by the example usage). You do NOT need a wrapper to run the command above -- just invoke ActiveState perl directly. Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] | [EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_Igor Peshansky, Ph.D. (name changed!) |,4- ) )-,_. ,\ ( `'-' old name: Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! Freedom is just another word for nothing left to lose... -- Janis Joplin -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: activestate perl on cygwin
On 1/11/07, Igor Peshansky wrote: On Thu, 11 Jan 2007, Kevin T Cella wrote: [snip] I'm asking for the short term solution. Answers were provided to you. Apparently they don't tickle your fancy. People have commented on that wrapper script that you posted. I still don't see what your problem is. If your Perl script expects C:\mydir\foo.dat then give it C:\mydir\foo.dat. Of course you'll need to do that under a cmd shell or, for Cygwin's bash shell you'll need to double the backslashes (C:\\mydir\\foo.dat) or use forward slashes (C:/mydir/foo.dat). If you insist on giving your Perl script /cygdrive/c/mydir/foo.dat then perhaps your Perl script should expect that and translate it. A quick Perl subroutine to do that shouldn't be that hard to code. Other posts have indicated how this is not possible. Executing a script That appears in my $PATH will automatically expand using cygwin style pathing. Answers were provided, but not to my original question. I still have no way to execute the command below and a regular script on cygwin using Activestate. perl -e 'print join \n, @INC, \n;' As you've noted yourself in the paragraph above, you only need the wrapper script to transform the script name from POSIX path style to Win32 style, and only if it's in the #! (shebang) line of a perl script. That was what my wrapper script was designed to do (as shown by the example usage). You do NOT need a wrapper to run the command above -- just invoke ActiveState perl directly. Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] | [EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_Igor Peshansky, Ph.D. (name changed!) |,4- ) )-,_. ,\ ( `'-' old name: Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! Freedom is just another word for nothing left to lose... -- Janis Joplin -- Bonus! ActiveState Perl on Windows (I think perl on Windows in general) doesn't even use the shebang. It's all based on file extension association (i.e. *.pl means run with C:\Perl\bin\perl.exe). The only thing it pulls from the shebang are the arguments to send to perl like -w. I always put #!/usr/bin/perl as my shebang whether I am writing the script for use in native Windows or for cygwin. It eliminates some complications for scripts that can run in either environment. Seriously, though, check out http://listserv.activestate.com/ and subscribe to one or more of the ActiveState mailing lists. There have been cygwin questions on the list before (unfortunately the usual answer is don't try to do that from cygwin). -Jason -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: activestate perl on cygwin
On Thu, 11 Jan 2007, DePriest, Jason R. wrote: On 1/11/07, Igor Peshansky wrote: On Thu, 11 Jan 2007, Kevin T Cella wrote: [snip] I'm asking for the short term solution. Answers were provided to you. Apparently they don't tickle your fancy. People have commented on that wrapper script that you posted. I still don't see what your problem is. If your Perl script expects C:\mydir\foo.dat then give it C:\mydir\foo.dat. Of course you'll need to do that under a cmd shell or, for Cygwin's bash shell you'll need to double the backslashes (C:\\mydir\\foo.dat) or use forward slashes (C:/mydir/foo.dat). If you insist on giving your Perl script /cygdrive/c/mydir/foo.dat then perhaps your Perl script should expect that and translate it. A quick Perl subroutine to do that shouldn't be that hard to code. Other posts have indicated how this is not possible. Executing a script That appears in my $PATH will automatically expand using cygwin style pathing. Answers were provided, but not to my original question. I still have no way to execute the command below and a regular script on cygwin using Activestate. perl -e 'print join \n, @INC, \n;' As you've noted yourself in the paragraph above, you only need the wrapper script to transform the script name from POSIX path style to Win32 style, and only if it's in the #! (shebang) line of a perl script. That was what my wrapper script was designed to do (as shown by the example usage). You do NOT need a wrapper to run the command above -- just invoke ActiveState perl directly. Igor Bonus! ActiveState Perl on Windows (I think perl on Windows in general) doesn't even use the shebang. It's all based on file extension association (i.e. *.pl means run with C:\Perl\bin\perl.exe). The only thing it pulls from the shebang are the arguments to send to perl like -w. Unfortunately, that's not much of a bonus in Cygwin shells, where the scripts *are* executed with the program in the shebang line. Yes, the shebang is useless if you double-click on a file in Explorer (or use cygstart), but if you want the script to be runnable from the Cygwin command line with the right version of perl, you'll need to make sure the shebang is correct. I always put #!/usr/bin/perl as my shebang whether I am writing the script for use in native Windows or for cygwin. It eliminates some complications for scripts that can run in either environment. IIRC, the OP's problem was that his scripts were ActiveState-specific. Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] | [EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_Igor Peshansky, Ph.D. (name changed!) |,4- ) )-,_. ,\ ( `'-' old name: Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! Freedom is just another word for nothing left to lose... -- Janis Joplin -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
RE: activestate perl on cygwin
Actually, being technical about this and looking at your OP there is no question there at all! Search for it. Look for a question mark. There is none. There is merely the sentence Please advise and that's what you got! Congratulations! I was wondering when someone would point that out; and for the record, ?. I can't use this pair of pliers to tow this boat. Please advise. - Well how about cha use a tow instead? Clever. Seeing as how you don't know what common tasks I am trying to automate, I don't see how you can presume to know the scripts do not have to be written in a Windows specific way. It's pretty much a given unless you simply insist on doing it in a Windows specific way. My operating system is Windows and therefore many of my applications are only compatible with Windows. In order to interact with the application through their SDKs, I need to use Win32 modules. I gave you an answer for your short term solution. If you insist on using a Windows oriented product such as ActiveState then fire up cmd and type in Windows specific path names to your Windows only ActiveState Perl scripts. Where's the problem? I'm lazy, it's inconvenient. Executing a script That appears in my $PATH will automatically expand using cygwin style pathing. This statement doesn't even make sense. What exactly is expanding? If you type myscript.pl 'C:\\Cygwin\\tmp\\file' and myscript.pl echoes out the first arg what do *you* get? That example I can simply handle in the application, but I mean more when I invoke the script. When it is in my $PATH and I type myscript.pl, the full path is expanded and passed to the interpreter with cygwin style paths. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
RE: activestate perl on cygwin
[snip] you only need the wrapper script to transform the script name from POSIX path style to Win32 style, and only if it's in the #! (shebang) line of a perl script. That was what my wrapper script was designed to do (as shown by the example usage). You do NOT need a wrapper to run the command above -- just invoke ActiveState perl directly. This is brilliant! I have no idea why I did not see it before, but this solves my problem in a very concise way. My wrapper script can mimic yours if the number of arguments is exactly 2. If they are greater than 2, then I will invoke Activestate perl directly making sure to use Windows style paths when appropriate (ie: perl -c file). On another, more apologetic note... I cannot believe I have not been kicked off this mailing list yet. Everyone has been more than helpful and I have just been a complete ass. Honestly, I could not tell you why, but for whatever reason it was kind of fun trying to find an angry retort. Maybe I finally snapped, all too often I post technical questions to forums or mailing lists without any solutions to my problems. I swear this is not me being sarcastic. You have my word I will continue to be less caustic. My rant is over. Thanks! -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: activestate perl on cygwin
Kevin T Cella wrote: Actually, being technical about this and looking at your OP there is no question there at all! Search for it. Look for a question mark. There is none. There is merely the sentence Please advise and that's what you got! Congratulations! I was wondering when someone would point that out; and for the record, ?. #! I can't use this pair of pliers to tow this boat. Please advise. - Well how about cha use a tow instead? Clever. Accurate and appropriate too! My operating system is Windows and therefore many of my applications are only compatible with Windows. Extremely shorted sighted I might add. I IM'ed recently with a former colleague of mine, fellow contractor since turned perm. The client, the largest privately held mortgage company mine you, had invested heavily in Clearcase and Clearquest software all running on Windows servers. They insisted up and down that all servers, and clients for that matter, will be Windows based. Thus the Clearquest team dutifully went off programming away hooks to Clearquest in Visual Basic. Anyways, my colleague now informs me that they need to translate all their VB code over to Perl because Linux is making inroads now. Sure they could and probably will base it off of ActiveState Perl (indeed Rational's Perl is based off of ActiveState) but the point of this little story is that you are short sighted if you believe that the only platform you'll encounter and thus need to deal with is Windows... In order to interact with the application through their SDKs, I need to use Win32 modules. As has been pointed out to you already there is Win32 modules for Cygwin's Perl. I gave you an answer for your short term solution. If you insist on using a Windows oriented product such as ActiveState then fire up cmd and type in Windows specific path names to your Windows only ActiveState Perl scripts. Where's the problem? I'm lazy, it's inconvenient. The lazy person will also cite convenience when using a plier as hammer. Fine. Just don't complain when it doesn't turn out as expected. That example I can simply handle in the application, but I mean more when I invoke the script. When it is in my $PATH and I type myscript.pl, the full path is expanded and passed to the interpreter with cygwin style paths. Although this is thorough off topic, perhaps you can explain it better to me as I don't use ActiveState therefore I don't see what you are claiming. Exactly which full path is expanded to what and passed to (guess) ActiveState Perl interpreter as, again, what? Is it $0 that you speak of that may be a Cygwin path? I'm confused however if it is $0 then why couldn't that also be handled in the Perl script? -- Andrew DeFaria http://defaria.com Clones are people two. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: activestate perl on cygwin
Kevin T Cella wrote: I don't actually install through cygwin, but use the ppm installer from Activestate. Why people would want to use a proprietary Perl with a proprietary installer is beyond me. Let me ask you a question, what happens when you call setsid in this ActiveState Perl? Anyways... I still need to know how to solve the issue that occurs with the command I mentioned in my original post. Using the version of perl installed with cygwin is not really an option since I already have scripts written that utilize windows specific modules. I betcha there are Cygwin versions of those windows specific modules... Best way to think of things IMHO, is either go totally into Cygwin or get totally out of Cygwin, WRT Perl. Said differently, if you're gonna be using Activestate Perl then start a cmd shell! I'm not sure I agree with your script's premise which states in the comment Cygwin passes 'cygwin style' paths to the program in the #! statement. I don't believe that is true. Cygwin passes what you specify at the command line. Cygwin doesn't really know, for example, given a myperlscript.pl foo/bar whether foo/bar is supposed to represent a path or just a set of characters. That's for your Perl script to decide and act upon. Of course if you are giving cygwin style paths on the command line then I'd expect them to come in in that manner. Stated differently, if you type myperlscript.pl /cygdrive/d/foo.dat then I'd expect /cygdrive/d/foo.data. Perhaps you should instead specify myperlscript.pl D:\\foo.dat? If you are saying that you like using the Cygwin bash prompt and like using say file name completion to help specify file paths to ActiveState Perl scripts then I would suggest this: Make your ActiveState Perl script aware that arguments it has that represent file paths may be coming in as a Cygwin path and have it convert the path to a Windows path in the Perl script. When I write Perl scripts I tend to write them so that they work on Linux/Unix and Windows using Cygwin or just plain Windows (and where possible totally neutral) and I usually leave open the possibility that a file path may be of Unix or Windows style and act accordingly. -- Andrew DeFaria http://defaria.com A good scapegoat is almost as good as a solution. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: activestate perl on cygwin
On Mon, 8 Jan 2007, Kevin T Cella wrote: I understand the trouble with using Activestate perl on cygwin is the path conversion problem. Searching online I found the following wrapper script useful for most perl commands: #! /bin/sh # This is necessary to make perl work with cygwin. Cygwin passes # cygwin style paths to the program in the #! statement and ActiveState # perl does not know what /cygwin/d/... means. # # So, we put #!/usr/local/bin/perl in the perl script and this is called # This routine translates the path name to something of type d:/ # args= while [ $# -gt 0 ] do var=$1 shift if test `echo $var | grep '/'` = $var then # cygpath does the /cygwin/d/ to d:/ conversion var=`cygpath -w $var` # Then we have to swap \ for / (extra \ needed because the # shell makes a first pass at removing the \. # var=`echo $var | sed 's/\\\/\\//g'` fi args=$args $var done # Finally the command is to call perl with the name of the script and the args. # /c/Perl/bin/perl.exe $args An example of one that does not work is as follows: perl -e 'print join \n, @INC, \n;' For some reason, the script above strips the single quotes from the command and therefore does not execute the command properly. Please advise. The reason the script above strips the single quotes from the command is because it's buggy. Not only that, it'll be pretty slow, as it'll spawn a 'test' and a 'sed' for every argument. And, judging from the comments, its intended purpose is to allow invoking perl with a script filename, not with a literal script. Oh, and there's a typo in the comment -- /cygwin/d should be /cygdrive/d. However, none of these issues are Cygwin-specific (with a possible exceptions of the typo and using cygpath -m instead of cygpath -w to save yourself the trouble of the extra backslash translation). Any good tutorial on bash should show you how to properly quote the arguments. You may also want to search the Cygwin list archives, where this exact issue comes up once in a while (usually in the context of paths with spaces). HTH, Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] | [EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_Igor Peshansky, Ph.D. (name changed!) |,4- ) )-,_. ,\ ( `'-' old name: Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! Freedom is just another word for nothing left to lose... -- Janis Joplin -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: activestate perl on cygwin
On Wed, 10 Jan 2007, Andrew DeFaria wrote: I'm not sure I agree with your script's premise which states in the comment Cygwin passes 'cygwin style' paths to the program in the #! statement. I don't believe that is true. Cygwin passes what you specify at the command line. That part is actually correct. Save the following two files, add the directory where you saved test_script.wr to $PATH, and then invoke it by name to see what I mean. --- BEGIN /usr/local/bin/wraptest --- #!/bin/sh echo $@ END /usr/local/bin/wraptest --- BEGIN test_script.wr #!/usr/local/bin/wraptest Doesn't matter what you put here... END test_script.wr - FWIW, for the past few years I've been using the following script to allow Windows programs in the shebang (#!) line: - BEGIN /usr/local/bin/wrap - #!/bin/sh pname=$1 fname=`cygpath -wi $2` shift 2 exec $pname $fname $@ -- END /usr/local/bin/wrap -- A typical use would be as follows: #!/usr/local/bin/wrap /cygdrive/c/perl/perl which invokes ActiveState Perl with Win32 path to the current script and with the rest of the arguments intact. Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] | [EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_Igor Peshansky, Ph.D. (name changed!) |,4- ) )-,_. ,\ ( `'-' old name: Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! Freedom is just another word for nothing left to lose... -- Janis Joplin -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: activestate perl on cygwin
Andrew DeFaria wrote: ... I don't actually install through cygwin, but use the ppm installer from Activestate. Why people would want to use a proprietary Perl with a proprietary installer is beyond me. Let me ask you a question, what happens when you call setsid in this ActiveState Perl? Anyways... Well, in my case when I make the call I run perl on Linux. Here I had to write a scripton a windows machine and before checking cygwin I checked activestate. Then I needed some modules, DBD:Orcale to be exact. This was a HUGE pain to get it to work, as Activestate has no binary. After having gone through this I got a further request: can your script do some graphs to? Then I thought of grace which does not work under windows, hence cygwin. But then I remembered the Oracle pains and though what it Oracle has a problem with cygwin or is a similar pain(I had some equally bad experience installing an oracle client on Linux), so since I'm no Oracle expert and would not have much help I decided not to mess with the perl+oracle DBD, hence installed the cygwin modules except perl. Ugly, but seems to work... -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
RE: activestate perl on cygwin
Win32::Mechanize Win32::OLE Win32::GuiTest Win32::Process -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Yitzchak Scott-Thoennes Sent: Tuesday, January 09, 2007 10:58 PM To: cygwin@cygwin.com Subject: Re: activestate perl on cygwin Kevin T Cella kcella at nycap.rr.com writes: Using the version of perl installed with cygwin is not really an option since I already have scripts written that utilize windows specific modules. Out of curiousity, which modules are those? -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
RE: activestate perl on cygwin
Offer an alternative. As I mentioned in my original post, I got this script online. In using it I found it was not sufficient, I started this thread in the hopes that someone would provide me with a better wrapper script. Instead I got a bunch of replies about how it is a bad idea to use Activestate with cygwin. My scripts are written to make my life on Windows easier, so that means using Windows specific code to automate common tasks. Ideally I'd prefer to stay in a pure Linux environment, but for reasons I do not need to go into, I am stuck with Windows. It was my understanding that the intent of this mailing list was to offer a place to discuss issues involving cygwin and develop solutions to those problems. Seeing as I do not have a whole lot of free time to research a better solution, I hoped a quick answer would be provided via this medium. While I appreciate the suggestions that have been made on this thread, I want to install two copies of the perl interpreter or port my existing scripts to cygwin as that appears to be the compromise. Are there any other ideas? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Igor Peshansky Sent: Wednesday, January 10, 2007 9:06 AM To: Kevin T Cella Cc: cygwin@cygwin.com Subject: Re: activestate perl on cygwin On Mon, 8 Jan 2007, Kevin T Cella wrote: I understand the trouble with using Activestate perl on cygwin is the path conversion problem. Searching online I found the following wrapper script useful for most perl commands: #! /bin/sh # This is necessary to make perl work with cygwin. Cygwin passes # cygwin style paths to the program in the #! statement and ActiveState # perl does not know what /cygwin/d/... means. # # So, we put #!/usr/local/bin/perl in the perl script and this is called # This routine translates the path name to something of type d:/ # args= while [ $# -gt 0 ] do var=$1 shift if test `echo $var | grep '/'` = $var then # cygpath does the /cygwin/d/ to d:/ conversion var=`cygpath -w $var` # Then we have to swap \ for / (extra \ needed because the # shell makes a first pass at removing the \. # var=`echo $var | sed 's/\\\/\\//g'` fi args=$args $var done # Finally the command is to call perl with the name of the script and the args. # /c/Perl/bin/perl.exe $args An example of one that does not work is as follows: perl -e 'print join \n, @INC, \n;' For some reason, the script above strips the single quotes from the command and therefore does not execute the command properly. Please advise. The reason the script above strips the single quotes from the command is because it's buggy. Not only that, it'll be pretty slow, as it'll spawn a 'test' and a 'sed' for every argument. And, judging from the comments, its intended purpose is to allow invoking perl with a script filename, not with a literal script. Oh, and there's a typo in the comment -- /cygwin/d should be /cygdrive/d. However, none of these issues are Cygwin-specific (with a possible exceptions of the typo and using cygpath -m instead of cygpath -w to save yourself the trouble of the extra backslash translation). Any good tutorial on bash should show you how to properly quote the arguments. You may also want to search the Cygwin list archives, where this exact issue comes up once in a while (usually in the context of paths with spaces). HTH, Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] | [EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_Igor Peshansky, Ph.D. (name changed!) |,4- ) )-,_. ,\ ( `'-' old name: Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! Freedom is just another word for nothing left to lose... -- Janis Joplin -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
RE: activestate perl on cygwin
Ugh, top-posting... Reformatted. On Wed, 10 Jan 2007, Kevin T Cella wrote: -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Igor Peshansky Sent: Wednesday, January 10, 2007 9:06 AM To: Kevin T Cella Cc: [EMAIL PROTECTED] http://cygwin.com/acronyms/#PCYMTNQREAIYR. Thanks. Subject: Re: activestate perl on cygwin On Mon, 8 Jan 2007, Kevin T Cella wrote: I understand the trouble with using Activestate perl on cygwin is the path conversion problem. Searching online I found the following wrapper script useful for most perl commands: [snip buggy script] An example of one that does not work is as follows: perl -e 'print join \n, @INC, \n;' For some reason, the script above strips the single quotes from the command and therefore does not execute the command properly. Please advise. The reason the script above strips the single quotes from the command is because it's buggy. [snip] However, none of these issues are Cygwin-specific (with a possible exceptions of the typo and using cygpath -m instead of cygpath -w to save yourself the trouble of the extra backslash translation). Any good tutorial on bash should show you how to properly quote the arguments. You may also want to search the Cygwin list archives, where this exact issue comes up once in a while (usually in the context of paths with spaces). Offer an alternative. As I mentioned in my original post, I got this script online. In using it I found it was not sufficient, I started this thread in the hopes that someone would provide me with a better wrapper script. I did. http://cygwin.com/ml/cygwin/2007-01/msg00270.html. Instead I got a bunch of replies about how it is a bad idea to use Activestate with cygwin. My scripts are written to make my life on Windows easier, so that means using Windows specific code to automate common tasks. Ideally I'd prefer to stay in a pure Linux environment, but for reasons I do not need to go into, I am stuck with Windows. It was my understanding that the intent of this mailing list was to offer a place to discuss issues involving cygwin and develop solutions to those problems. Seeing as I do not have a whole lot of free time to research a better solution, I hoped a quick answer would be provided via this medium. While I appreciate the suggestions that have been made on this thread, I want to install two copies of the perl interpreter or port my existing scripts to cygwin as that appears to be the compromise. Are there any other ideas? Rant aside, there is nothing Cygwin-specific about writing such a wrapper script. As I said, any good bash tutorial would have contained enough information for you to write one. Since this is not a bash support list, discussion of techniques for making such scripts work is off-topic. Besides, it's been discussed to death at least 3 times that I recall -- and it's all in the archives of this very list. The script in my message above has definitely been posted before, and even in a similar context. In fact, that discussion is the 5th match when searching the list archives for activestate wrapper, and the 1st (yes, first) match when Googling for activestate wrapper site:cygwin.com inurl:ml (or even for activestate wrapper cygwin). That's why we have the web archives -- to hopefully avoid rehashing the same issues over and over again. HTH, Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] | [EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_Igor Peshansky, Ph.D. (name changed!) |,4- ) )-,_. ,\ ( `'-' old name: Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! Freedom is just another word for nothing left to lose... -- Janis Joplin -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
RE: activestate perl on cygwin
http://cygwin.com/acronyms/#PCYMTNQREAIYR. Thanks. Seeing as I do not know how to configure this, I cannot oblige. Offer an alternative. As I mentioned in my original post, I got this script online. In using it I found it was not sufficient, I started this thread in the hopes that someone would provide me with a better wrapper script. I did. http://cygwin.com/ml/cygwin/2007-01/msg00270.html. This also does not appear to work for the example I gave. ... there is nothing Cygwin-specific about writing such a wrapper script. As I said, any good bash tutorial would have contained enough information for you to write one. Since this is not a bash support list, discussion of techniques for making such scripts work is off-topic. That's debatable, the distinction is vague at best. Besides, it's been discussed to death at least 3 times that I recall -- and it's all in the archives of this very list. The script in my message above has definitely been posted before, and even in a similar context. In fact, that discussion is the 5th match when searching the list archives for activestate wrapper, and the 1st (yes, first) match when Googling for activestate wrapper site:cygwin.com inurl:ml (or even for activestate wrapper cygwin). That's why we have the web archives -- to hopefully avoid rehashing the same issues over and over again. Seeing as I do not have a whole lot of free time to research a better solution, I hoped a quick answer would be provided via this medium. [snip] HTH, Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] | [EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_Igor Peshansky, Ph.D. (name changed!) |,4- ) )-,_. ,\ ( `'-' old name: Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! Freedom is just another word for nothing left to lose... -- Janis Joplin -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: activestate perl on cygwin
[EMAIL PROTECTED] wrote: Andrew DeFaria wrote: ... I don't actually install through cygwin, but use the ppm installer from Activestate. Why people would want to use a proprietary Perl with a proprietary installer is beyond me. Let me ask you a question, what happens when you call setsid in this ActiveState Perl? Anyways... Well, in my case when I make the call I run perl on Linux. Here I had to write a scripton a windows machine and before checking cygwin I checked activestate. Then I needed some modules, DBD:Orcale to be exact. Maybe you should have looked for DBD::Oracle instead? :-) There's another thing. Why spend all kinds of $$$ on Oracle when one can use a fine database like MySQL for free? This was a HUGE pain to get it to work, as Activestate has no binary. Well I've never tried to get Oracle working through Cygwin (again I would just use MySQL) but you say it was a pain to get to work under ActiveState. Did you try to get it to work under Cygwin? After having gone through this I got a further request: can your script do some graphs to? Then I thought of grace which does not work under windows, hence cygwin. But then I remembered the Oracle pains and though what it Oracle has a problem with cygwin or is a similar pain(I had some equally bad experience installing an oracle client on Linux), so since I'm no Oracle expert and would not have much help I decided not to mess with the perl+oracle DBD, hence installed the cygwin modules except perl. Ugly, but seems to work... Aside from the grammatical errors my point still stands. AFAIK ppm, ActiveState's module installer, only works in ActiveState and I don't believe that ActiveState works on Linux, Unix and Macs, whereas the standard perl -MCPAN thing works on all of those and Windows too, under Cygwin of course. And to me Cygwin is precisely that bit of great glue that can make all of these platforms relatively the same and portable. As such, insisting on a product that only works on one platform and works differently than all other platforms just doesn't seem the right way to go. And yes I know many clients (I'm a contractor and have clients too - I'm not without experience here) don't, for some reason or another, trust or rely on Cygwin in this fashion to help normalize the environment so that many applications can be written and shared between the various platforms that these clients have. However that doesn't mean that this is not the best way to go, IMHO. YMMV, and all that. -- Andrew DeFaria http://defaria.com That's a hell of an ambition, to be mellow. It's like wanting to be senile. - Randy Newman -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: activestate perl on cygwin
On 1/10/07, Kevin T Cella wrote: Offer an alternative. As I mentioned in my original post, I got this script online. In using it I found it was not sufficient, I started this thread in the hopes that someone would provide me with a better wrapper script. Instead I got a bunch of replies about how it is a bad idea to use Activestate with cygwin. My scripts are written to make my life on Windows easier, so that means using Windows specific code to automate common tasks. Ideally I'd prefer to stay in a pure Linux environment, but for reasons I do not need to go into, I am stuck with Windows. It was my understanding that the intent of this mailing list was to offer a place to discuss issues involving cygwin and develop solutions to those problems. Seeing as I do not have a whole lot of free time to research a better solution, I hoped a quick answer would be provided via this medium. While I appreciate the suggestions that have been made on this thread, I want to install two copies of the perl interpreter or port my existing scripts to cygwin as that appears to be the compromise. Are there any other ideas? I use both ActiveState Perl (I purchase a Perl Developer's Kit license from them every year actually) and the perl in cygwin. I use them each in their appropriate environment, which means I don't run Windows specific scripts under cygwin. I never bothered asking anyone on this list to help me overcome that limitation because cygwin isn't Windows and the ActiveState Perl distribution I use is designed to work with Windows and supports modules precompiled for Windows. CPAN is awesome and can download and compile modules for me in cygwin (as long as I am not behind a proxy server), but, yes, there are some modules that will not compile under cygwin because it is listed as not supported. You can get the Win32 module and Win32::GUI for cygwin perl and that is about it. I'm guessing if you want other modules to work under cygwin, someone will eventually suggest you see how those were made to work and do it yourself. That's cruel and sort of mean, but that is the way things are in this particular volunteer-based project. I miss the Windows-specific modules that make things in ActiveState Perl super-easy when I am in cygwin. One of the reasons I buy a PDK membership every year is so I can use ActiveStates perlapp tool. I tweak my scripts under native Windows, use perlapp to exe'ify them, and then I can run them from wherever. As long as I refer to paths using the forward slash notation (perl will accept forward or backward slashes and translate as appropriate), I don't have problems. I think the wrapper script idea is neat, but prone to errors and complications that would make any of your work more difficult to debug. But if that is the route you want to go, fantastic. The ideas that have been presented in this thread should be enough to get you started in the right direction. Have you posted anything to the ActiveState mailing lists? They have a perl-win32 users list that might have some experienced users. Or if you are truly seeking perl enlightenment, try perlmonks.org. They have transcended beyond WJM over there and take to challenges like flies on... well something flies would like a lot. Good luck anyway, but this has severely grown off topic (from a cygwin standpoint) and, though I haven't heard this one in a while, you may be asked to TITTTL. -Jason -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: activestate perl on cygwin
On 1/10/07, Andrew DeFaria wrote: some dude wrote: Andrew DeFaria wrote: ... I don't actually install through cygwin, but use the ppm installer from Activestate. Why people would want to use a proprietary Perl with a proprietary installer is beyond me. Let me ask you a question, what happens when you call setsid in this ActiveState Perl? Anyways... Well, in my case when I make the call I run perl on Linux. Here I had to write a scripton a windows machine and before checking cygwin I checked activestate. Then I needed some modules, DBD:Orcale to be exact. Maybe you should have looked for DBD::Oracle instead? :-) According to ActiveState's website (http://aspn.activestate.com/ASPN/docs/ActivePerl/5.8/faq/ActivePerl-faq2.html) DBD::Oracle Oracle no longer provides the Oracle client libraries for free, so we can no longer provide DBD Oracle as a PPM/PPM3 module. The DBD-Oracle package for ActivePerl 5.6 is the last package compiled before the licensing changed that is still available on our site. If you wish to compile this module locally, the source may be obtained from www.cpan.org. Instructions on using CPAN are at: http://aspn.activestate.com/ASPN/Reference/Products/ActivePerl/lib/CPAN.html. If you are using Windows, an easy workaround for you might be just to use DBD-ODBC instead. Aside from the grammatical errors my point still stands. AFAIK ppm, ActiveState's module installer, only works in ActiveState and I don't believe that ActiveState works on Linux, Unix and Macs, whereas the - - - - - cut - - - - - - - It looks like PPM3 works with all the OSes that ActiveState releases perl for which include Windows, Linux, MacOS X, Solaris, and HP-UX. I am not so sure about PPM2. It only has instructions for Windows. Again, we have moved way out of the realm of relevance to cygwin at this point. -Jason -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: activestate perl on cygwin
Kevin T Cella wrote: Offer an alternative. As I mentioned in my original post, I got this script online. In using it I found it was not sufficient, I started this thread in the hopes that someone would provide me with a better wrapper script. Instead I got a bunch of replies about how it is a bad idea to use Activestate with cygwin. But it is a bad idea to use ActiveState under Cygwin. Would you prefer if we lied to you? My scripts are written to make my life on Windows easier, so that means using Windows specific code to automate common tasks. But you really don't need to do such things in a Windows specific way! I used to run my whole domain under Cygwin. Apache for my web server, exim for a mail server, Cygwin's own inetutils for ftp, ssh, etc. Everything ran fine albeit a bit slower due to the fact that Cygwin is an emulation environment. Eventually I got another box and initially installed SuSE on it and moved over all my scripts and processes. Porting was minimal at best because I grew up on HP-UX actually in a Unix environment and just thought that way. Later I moved to Fedora Core 3 which is what I have today. But again, the point is that I use scripts to make my life easier too. And my scripts were written with a Unix mentality to start with and leaned on Cygwin to provide that Unix/Linux/Posix style environment. My scripts are useful and work well and ported with minimal effort. Just because you're one a Windows box doesn't mean you have to code like Microsoft! Ideally I'd prefer to stay in a pure Linux environment, but for reasons I do not need to go into, I am stuck with Windows. Again, that's the whole point of Cygwin at least to me. You can be stuck with Windows and still think with a Unix/Linux mindset and get even more useful work done with less effort. It was my understanding that the intent of this mailing list was to offer a place to discuss issues involving cygwin and develop solutions to those problems. And if the real, long term, more portable solution is to use a Cygwin based, thus more normal Perl... BTW you never told me what setsid does under ActiveState Perl... Seeing as I do not have a whole lot of free time to research a better solution, I hoped a quick answer would be provided via this medium. Answers were provided to you. Apparently they don't tickle your fancy. People have commented on that wrapper script that you posted. I still don't see what your problem is. If your Perl script expects C:\mydir\foo.dat then give it C:\mydir\foo.dat. Of course you'll need to do that under a cmd shell or, for Cygwin's bash shell you'll need to double the backslashes (C:\\mydir\\foo.dat) or use forward slashes (C:/mydir/foo.dat). If you insist on giving your Perl script /cygdrive/c/mydir/foo.dat then perhaps your Perl script should expect that and translate it. A quick Perl subroutine to do that shouldn't be that hard to code. While I appreciate the suggestions that have been made on this thread, I want to install two copies of the perl interpreter or port my existing scripts to cygwin as that appears to be the compromise. Are there any other ideas? I don't think there is anything stopping an ActiveState Perl script to call a simple Perl subroutine that translates any Cygwin style paths to paths that ActiveState likes seeing. -- Andrew DeFaria http://defaria.com I want to die peacefully in my sleep like my grandfather... Not screaming and yelling like the passengers in his car. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: activestate perl on cygwin
Kevin T Cella wrote: ... there is nothing Cygwin-specific about writing such a wrapper script. As I said, any good bash tutorial would have contained enough information for you to write one. Since this is not a bash support list, discussion of techniques for making such scripts work is off-topic. That's debatable, the distinction is vague at best. Not to anybody here. There are various solutions to your problem, some involving a wrapper script in a shell such as bash or handling the situation in Perl itself. Being as this list is about Cygwin the emulation environment itself, it's clear that how to write a bash wrapper script to call some thing outside of Cygwin's purvey or similar in Perl is definitely off topic by definition. If you cannot see that distinction then I don't know what to tell ya. Cygwin is made to work with Cygwin, not arbitrary Windows oriented application. That part's up to you to implement with the tools provided. -- Andrew DeFaria http://defaria.com Sped up my XT; ran it on 220v! Works greO?_~ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: activestate perl on cygwin
DePriest, Jason R. wrote: checked activestate. Then I needed some modules, DBD:Orcale to be exact. Maybe you should have looked for DBD::Oracle instead? :-) According to ActiveState's website (http://aspn.activestate.com/ASPN/docs/ActivePerl/5.8/faq/ActivePerl-faq2.html) DBD::Oracle Oracle no longer provides the Oracle client libraries for Apparently somebody didn't get the joke/prod that I was doing based on the fact that the OP misspelled Oracle as Orcale and mistyped the :: as :... And damn I included a smiley... Aside from the grammatical errors my point still stands. AFAIK ppm, ActiveState's module installer, only works in ActiveState and I don't believe that ActiveState works on Linux, Unix and Macs, whereas the - - - - - cut - - - - - - - It looks like PPM3 works with all the OSes that ActiveState releases perl for which include Windows, Linux, MacOS X, Solaris, and HP-UX. Apparently ActiveState has been ported to more platforms than I was aware of. Still, authors on CPAN, in general, don't know or think about PPM (AFAICT) and just do things in what they consider the standard way (perl -MCPAN). I guess my point can be boiled down to Why fight the trend?. YMMV That plus that annual subscription fee is way out of my $0.00 software budget! ;-) I am not so sure about PPM2. It only has instructions for Windows. Again, we have moved way out of the realm of relevance to cygwin at this point. Yes but it is fun isn't it? -- Andrew DeFaria http://defaria.com Doesn't expecting the unexpected make the unexpected the expected. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: activestate perl on cygwin
But how do you then install modules? Just like in unix from the tarballs that are intended for unix? -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: activestate perl on cygwin
[EMAIL PROTECTED] wrote: But how do you then install modules? Just like in unix from the tarballs that are intended for unix? Essentially, yes. Just run CPAN (perl -MCPAN -e shell) and type install Foo::Bar just as you would on any unix system. You don't have to actually know or care about tarballs, CPAN does all that for you. Note that if a module has a prerequisite for a library you must install that library first, just as you would on a unix system. But modules that require this are few and far between (e.g. DBD::MySql requires libmysqlclient.) When in doubt, the answer to any Cygwin question should be as you would on any posix system. Brian -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: activestate perl on cygwin
On 1/9/07, Brian Dessent wrote: moka at hol dot gr wrote: But how do you then install modules? Just like in unix from the tarballs that are intended for unix? Essentially, yes. Just run CPAN (perl -MCPAN -e shell) and type install Foo::Bar just as you would on any unix system. You don't have to actually know or care about tarballs, CPAN does all that for you. One caveat. If you are behind a proxy server that requires authentication, ActiveState's PPM install tools are much easier to get reliably working than the various command-line tools that CPAN uses (wget, lynx, ncftp, Net::FTP, etc). -Jason -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
RE: activestate perl on cygwin
I don't actually install through cygwin, but use the ppm installer from Activestate. I still need to know how to solve the issue that occurs with the command I mentioned in my original post. Using the version of perl installed with cygwin is not really an option since I already have scripts written that utilize windows specific modules. Thanks, Kevin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of DePriest, Jason R. Sent: Tuesday, January 09, 2007 12:13 PM To: cygwin@cygwin.com Subject: Re: activestate perl on cygwin On 1/9/07, Brian Dessent wrote: moka at hol dot gr wrote: But how do you then install modules? Just like in unix from the tarballs that are intended for unix? Essentially, yes. Just run CPAN (perl -MCPAN -e shell) and type install Foo::Bar just as you would on any unix system. You don't have to actually know or care about tarballs, CPAN does all that for you. One caveat. If you are behind a proxy server that requires authentication, ActiveState's PPM install tools are much easier to get reliably working than the various command-line tools that CPAN uses (wget, lynx, ncftp, Net::FTP, etc). -Jason -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: activestate perl on cygwin
Kevin T Cella kcella at nycap.rr.com writes: Using the version of perl installed with cygwin is not really an option since I already have scripts written that utilize windows specific modules. Out of curiousity, which modules are those? -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: activestate perl on cygwin
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Kevin T Cella on 1/8/2007 8:56 PM: For some reason, the script above strips the single quotes from the command and therefore does not execute the command properly. Please advise. If you want my advice, use cygwin perl instead of activestate perl. Then you don't have to worry about wrappers. - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFoxOV84KuGfSFAYARAvT6AJ4sYudhwS2+nNzVyI47qg2eQMPHdACfeGlv Myy1AEpwtiK8BRo5uiDJaYo= =Z6e0 -END PGP SIGNATURE- -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/