Fwd: Re: MacPort: how to port perl?
-- Forwarded message -- From: Stephen M. Harris [EMAIL PROTECTED] Date: Tue, Sep 9, 2008 at 9:26 PM Subject: Fwd: Re: MacPort: how to port perl? GET ME OFF THIS GODDAM LIST! Begin forwarded message: From: Vic Norton [EMAIL PROTECTED] Date: September 9, 2008 9:24:09 PM EDT To: David Cantrell [EMAIL PROTECTED] Cc: Perl MacOSX macosx@perl.org Subject: Re: MacPort: how to port perl? I'm not sure what this proves, David. I've tried your trick 3 times and gotten three different answers. And I don't think PERL5LIB has anything to do with any of them. ### Test 1 ### vic$ /usr/bin/perl -e '$,=\n;print @INC,\n;' /System/Library/Perl/5.8.6/darwin-thread-multi-2level /System/Library/Perl/5.8.6 /Library/Perl/5.8.6/darwin-thread-multi-2level /Library/Perl/5.8.6 /Library/Perl /Network/Library/Perl/5.8.6/darwin-thread-multi-2level /Network/Library/Perl/5.8.6 /Network/Library/Perl /System/Library/Perl/Extras/5.8.6/darwin-thread-multi-2level /System/Library/Perl/Extras/5.8.6 /Library/Perl/5.8.1/darwin-thread-multi-2level /Library/Perl/5.8.1 . ### Test 2 ### vic$ /usr/local/bin/perl5.8.8 -e '$,=\n;print @INC,\n;' /usr/local/lib/perl5/5.8.8/darwin-2level /usr/local/lib/perl5/5.8.8 /usr/local/lib/perl5/site_perl/5.8.8/darwin-2level /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl . ### Test 3 ### vic$ /opt/local/bin/perl -e '$,=\n;print @INC,\n;' /opt/local/lib/perl5/5.8.8/darwin-2level /opt/local/lib/perl5/5.8.8 /opt/local/lib/perl5/site_perl/5.8.8/darwin-2level /opt/local/lib/perl5/site_perl/5.8.8 /opt/local/lib/perl5/site_perl /opt/local/lib/perl5/vendor_perl/5.8.8/darwin-2level /opt/local/lib/perl5/vendor_perl/5.8.8 /opt/local/lib/perl5/vendor_perl . Modules from MacPorts like Cript::SSLeay appear in the vendor_perl folder of /opt/local/lib/perl5. Regards, Vic On Sep 9, 2008, at 9:07 AM, David Cantrell wrote: On Sun, Sep 07, 2008 at 06:23:13PM -0400, Vic Norton wrote: As far as I can tell Perl on a Mac pays absolutely no attention the environmental variable PERL5LIB. I'm afraid that's not the case: cowshed-door:~ david$ /usr/bin/perl -e '$,=\n;print @INC' /sw/lib/perl5 /sw/lib/perl5/darwin /System/Library/Perl/5.8.6/darwin-thread-multi-2level /System/Library/Perl/5.8.6 /Library/Perl/5.8.6/darwin-thread-multi-2level /Library/Perl/5.8.6 /Library/Perl /Network/Library/Perl/5.8.6/darwin-thread-multi-2level /Network/Library/Perl/5.8.6 /Network/Library/Perl /System/Library/Perl/Extras/5.8.6/darwin-thread-multi-2level /System/Library/Perl/Extras/5.8.6 /Library/Perl/5.8.1 -- Stephen M. Harris DP/NY http://www.kmreps.net/dp_index.html
Re: MacPort: how to port perl?
I guess you are right, Charlie. Apparently each of 3 Perls in my system has it's own PERLIB, but a PERL5LIB specification in ~/.bashprofile will add directories to any of the 3 corresponding @INC's. On Sep 9, 2008, at 10:32 PM, Charlie Garrison wrote: Good afternoon, On 9/9/08 at 9:24 PM -0400, Vic Norton [EMAIL PROTECTED] wrote: I'm not sure what this proves, David. I've tried your trick 3 times and gotten three different answers. And I don't think PERL5LIB has anything to do with any of them. What is the value of your PERL5LIB? From your perl output we can see the defaults for @INC, but without knowing the value of PERL5LIB it's hard to draw any conclusions. My experience matches David's; the PERL5LIB variable does work as advertised. Charlie
Re: MacPort: how to port perl?
On Sun, Sep 07, 2008 at 06:23:13PM -0400, Vic Norton wrote: As far as I can tell Perl on a Mac pays absolutely no attention the environmental variable PERL5LIB. I'm afraid that's not the case: cowshed-door:~ david$ /usr/bin/perl -e '$,=\n;print @INC' /sw/lib/perl5 /sw/lib/perl5/darwin /System/Library/Perl/5.8.6/darwin-thread-multi-2level /System/Library/Perl/5.8.6 /Library/Perl/5.8.6/darwin-thread-multi-2level /Library/Perl/5.8.6 /Library/Perl /Network/Library/Perl/5.8.6/darwin-thread-multi-2level /Network/Library/Perl/5.8.6 /Network/Library/Perl /System/Library/Perl/Extras/5.8.6/darwin-thread-multi-2level /System/Library/Perl/Extras/5.8.6 /Library/Perl/5.8.1
Re: MacPort: how to port perl?
On Tue, Sep 09, 2008 at 02:07:58PM +0100, David Cantrell wrote: cowshed-door:~ david$ /usr/bin/perl -e '$,=\n;print @INC' /sw/lib/perl5 /sw/lib/perl5/darwin /System/Library/Perl/5.8.6/darwin-thread-multi-2level /System/Library/Perl/5.8.6 /Library/Perl/5.8.6/darwin-thread-multi-2level /Library/Perl/5.8.6 /Library/Perl /Network/Library/Perl/5.8.6/darwin-thread-multi-2level /Network/Library/Perl/5.8.6 /Network/Library/Perl /System/Library/Perl/Extras/5.8.6/darwin-thread-multi-2level /System/Library/Perl/Extras/5.8.6 /Library/Perl/5.8.1 Ooh, bug in mutt! That was followed by a line with '.' on its own, and then a whole load more stuff where I unset PERL5LIB and demonstrated that @INC changed. I wonder if I can make it happen again ...
Re: MacPort: how to port perl?
I'm not sure what this proves, David. I've tried your trick 3 times and gotten three different answers. And I don't think PERL5LIB has anything to do with any of them. ### Test 1 ### vic$ /usr/bin/perl -e '$,=\n;print @INC,\n;' /System/Library/Perl/5.8.6/darwin-thread-multi-2level /System/Library/Perl/5.8.6 /Library/Perl/5.8.6/darwin-thread-multi-2level /Library/Perl/5.8.6 /Library/Perl /Network/Library/Perl/5.8.6/darwin-thread-multi-2level /Network/Library/Perl/5.8.6 /Network/Library/Perl /System/Library/Perl/Extras/5.8.6/darwin-thread-multi-2level /System/Library/Perl/Extras/5.8.6 /Library/Perl/5.8.1/darwin-thread-multi-2level /Library/Perl/5.8.1 . ### Test 2 ### vic$ /usr/local/bin/perl5.8.8 -e '$,=\n;print @INC,\n;' /usr/local/lib/perl5/5.8.8/darwin-2level /usr/local/lib/perl5/5.8.8 /usr/local/lib/perl5/site_perl/5.8.8/darwin-2level /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl . ### Test 3 ### vic$ /opt/local/bin/perl -e '$,=\n;print @INC,\n;' /opt/local/lib/perl5/5.8.8/darwin-2level /opt/local/lib/perl5/5.8.8 /opt/local/lib/perl5/site_perl/5.8.8/darwin-2level /opt/local/lib/perl5/site_perl/5.8.8 /opt/local/lib/perl5/site_perl /opt/local/lib/perl5/vendor_perl/5.8.8/darwin-2level /opt/local/lib/perl5/vendor_perl/5.8.8 /opt/local/lib/perl5/vendor_perl . Modules from MacPorts like Cript::SSLeay appear in the vendor_perl folder of /opt/local/lib/perl5. Regards, Vic On Sep 9, 2008, at 9:07 AM, David Cantrell wrote: On Sun, Sep 07, 2008 at 06:23:13PM -0400, Vic Norton wrote: As far as I can tell Perl on a Mac pays absolutely no attention the environmental variable PERL5LIB. I'm afraid that's not the case: cowshed-door:~ david$ /usr/bin/perl -e '$,=\n;print @INC' /sw/lib/perl5 /sw/lib/perl5/darwin /System/Library/Perl/5.8.6/darwin-thread-multi-2level /System/Library/Perl/5.8.6 /Library/Perl/5.8.6/darwin-thread-multi-2level /Library/Perl/5.8.6 /Library/Perl /Network/Library/Perl/5.8.6/darwin-thread-multi-2level /Network/Library/Perl/5.8.6 /Network/Library/Perl /System/Library/Perl/Extras/5.8.6/darwin-thread-multi-2level /System/Library/Perl/Extras/5.8.6 /Library/Perl/5.8.1
Re: MacPort: how to port perl?
Good afternoon, On 9/9/08 at 9:24 PM -0400, Vic Norton [EMAIL PROTECTED] wrote: I'm not sure what this proves, David. I've tried your trick 3 times and gotten three different answers. And I don't think PERL5LIB has anything to do with any of them. What is the value of your PERL5LIB? From your perl output we can see the defaults for @INC, but without knowing the value of PERL5LIB it's hard to draw any conclusions. My experience matches David's; the PERL5LIB variable does work as advertised. Charlie -- Charlie Garrison [EMAIL PROTECTED] PO Box 141, Windsor, NSW 2756, Australia O ascii ribbon campaign - stop html mail - www.asciiribbon.org http://www.ietf.org/rfc/rfc1855.txt
Re: MacPort: how to port perl?
Things you may need to consider (as I had removed my 5.8.8 some time back -- regarding Perl, I use a standard Tiger installation); - where is your shell PATH pointing? - where is your editor looking (might be the same as above) ? - is the script executable or do you prefix running it with the actual command perl and, thus, which Perl (again) ? - I thought PERL5LIB _was_ defined somewhere... I can not remember. David On 7 Sep, 2008, at 18:23, Vic Norton wrote: On Sep 7, 2008, at 11:42 AM, David Green wrote: Do you have an issue of Perl versions here -- 5.8.6 having been upgraded to 5.8.8? I never solved the issue myself; ultimately I just stayed with the OS X standard or 5.8.8 and removed MacPorts. Would love for some clued in explanations ;) I can not remember the details of what I was trying but I guess it was less important then having a fully 'aware' Perl installation. David Hi David, As far as I can tell Perl on a Mac pays absolutely no attention the environmental variable PERL5LIB. I have eliminated all PERL5LIB specifications on my machine. Here are a couple of test scripts that illustrate my point. Script 1 [put either shebang line here] #!/usr/bin/perl -w #!/opt/local/bin/perl -w # test1.pl - Test Perl constructs use strict; use Date::Format; Script 2 [put either shebang line here] #!/usr/bin/perl -w #!/opt/local/bin/perl -w # test2.pl - Test Perl constructs use strict; use Crypt::SSLeay; When I run Script 1, either from Terminal or from BBEdit, nothing happens with the top shebang line (Date::Format is in my /usr/bin/ perl [5.8.6] tree), but I get an error message listing @INC with the bottom shebang line (Date::Format is not in my /opt/local/bin/ perl [5.8.8] tree). Just the opposite situation occurs when I run Script 2, either from Terminal or from BBEdit. I get an error message listing @INC with top bottom shebang line (Crypt::SSLeay is not in my /usr/bin/perl [5.8.6] tree), but nothing happens with the bottom shebang line (Crypt::SSLeay is in my /opt/local/bin/perl [5.8.8] tree). I have found no way of running a module in one Perl tree with the other version of Perl. Regards, Vic
Re: MacPort: how to port perl?
What folders contain files to configure Perl ? On 7 Sep, 2008, at 20:02, Doug McNutt wrote: At 18:23 -0400 9/7/08, Vic Norton wrote: As far as I can tell Perl on a Mac pays absolutely no attention the environmental variable PERL5LIB. I have eliminated all PERL5LIB specifications on my machine. You WILL have that problem if you try to define PERL5LIB as an environment variable in your .profile or one of the *rc scripts. If you define it in $HOME/.MacOSX/environment.plist it will actually be read at log in to aqua time and will be reflected in whatever shell script or bbedit worksheet that you open after that. A login to MacOS neXt bears no resemblance to a login via ssh. -- -- If it's not on fire it's a software problem. --
Re: MacPort: how to port perl?
Do you have an issue of Perl versions here -- 5.8.6 having been upgraded to 5.8.8? I never solved the issue myself; ultimately I just stayed with the OS X standard or 5.8.8 and removed MacPorts. Would love for some clued in explanations ;) I can not remember the details of what I was trying but I guess it was less important then having a fully 'aware' Perl installation. David On 7 Sep, 2008, at 10:09, Vic Norton wrote: I want to access https URLs on the web via LPW. To do this I need Crypt::SSLeay. I have not been able to install Crypt::SSLeay directly so I tried MacPorts. Everything seemed to go fine, but LPW::UserAgent says Crypt::SSLeay is not installed: 501 Protocol scheme 'https' is not supported (Crypt::SSLeay not installed) I can see Crypt::SSLeay in two places: /opt/local/lib/perl5/vendor_perl/5.8.8/darwin-2level/Crypt/SSLeay /opt/local/lib/perl5/vendor_perl/5.8.8/darwin-2level/auto/Crypt/ SSLeay Right now I've got PERL5LIB=/Library/Perl/5.8.6:/opt/local/lib/perl5/vendor_perl/ 5.8.8/darwin-2level LPW insists Crypt::SSLeay is not installed. I've tried various other PER5LIB strings that seemed appropriate. None worked. How do I get Perl to recognize a Perl module ported via MacPorts? In particular, how do I get LPW::UserAgent to see Crypt::SSLeay? Thanks for any advice you van give me. Regards, Vic
Re: MacPort: how to port perl?
On Sep 7, 2008, at 11:42 AM, David Green wrote: Do you have an issue of Perl versions here -- 5.8.6 having been upgraded to 5.8.8? I never solved the issue myself; ultimately I just stayed with the OS X standard or 5.8.8 and removed MacPorts. Would love for some clued in explanations ;) I can not remember the details of what I was trying but I guess it was less important then having a fully 'aware' Perl installation. David Hi David, As far as I can tell Perl on a Mac pays absolutely no attention the environmental variable PERL5LIB. I have eliminated all PERL5LIB specifications on my machine. Here are a couple of test scripts that illustrate my point. Script 1 [put either shebang line here] #!/usr/bin/perl -w #!/opt/local/bin/perl -w # test1.pl - Test Perl constructs use strict; use Date::Format; Script 2 [put either shebang line here] #!/usr/bin/perl -w #!/opt/local/bin/perl -w # test2.pl - Test Perl constructs use strict; use Crypt::SSLeay; When I run Script 1, either from Terminal or from BBEdit, nothing happens with the top shebang line (Date::Format is in my /usr/bin/ perl [5.8.6] tree), but I get an error message listing @INC with the bottom shebang line (Date::Format is not in my /opt/local/bin/perl [5.8.8] tree). Just the opposite situation occurs when I run Script 2, either from Terminal or from BBEdit. I get an error message listing @INC with top bottom shebang line (Crypt::SSLeay is not in my /usr/bin/perl [5.8.6] tree), but nothing happens with the bottom shebang line (Crypt::SSLeay is in my /opt/local/bin/perl [5.8.8] tree). I have found no way of running a module in one Perl tree with the other version of Perl. Regards, Vic
Re: MacPort: how to port perl?
At 18:23 -0400 9/7/08, Vic Norton wrote: As far as I can tell Perl on a Mac pays absolutely no attention the environmental variable PERL5LIB. I have eliminated all PERL5LIB specifications on my machine. You WILL have that problem if you try to define PERL5LIB as an environment variable in your .profile or one of the *rc scripts. If you define it in $HOME/.MacOSX/environment.plist it will actually be read at log in to aqua time and will be reflected in whatever shell script or bbedit worksheet that you open after that. A login to MacOS neXt bears no resemblance to a login via ssh. -- -- If it's not on fire it's a software problem. --