Re: New Perl-Installation on new OS X

2011-06-09 Thread Marek Stepanek

On 09.06.2011 05:38, Sherm Pendley wrote:



I'm probably over-cautious, but I never migrate - I always format and
make a clean install, then do a clean install of all my apps. I back
up my home directory, and copy it over, which preserves all my
personal preferences and such.

sherm--



Sherm, I would like to keep now my installation, as it is. If possible. 
Or I would compile perl-5.14.0 under /usr/local


But perhaps this list could help me, to get @INC and $PERL5LIB clean of 
/sw ... How is it possible, that I have $PERL5LIB set to


%ENV:
PERL5LIB=/sw/lib/perl5:/sw/lib/perl5/darwin

I only see two files:

~/.profile

and

~/.tcshrc


in the first file I only have one line:

test -r /sw/bin/init.sh  . /sw/bin/init.sh

in .tcshrc is longer:


***

setenv LC_ALL C
setenv LANG en_GB.UTF-8
# export LC_MESSAGES=CHow to set this var?
# export ARCHFLAGS=-arch i386 -arch x86_64

set complete=enhance
set addsuffix
set autoexpand
set histdup=erase
set autolist
set autocorrect
set backslash_quote
set correct=cmd
set dspmbyte=utf8
unset histlit
set symlinks=ignore
unset recexact
bindkey -k up history-search-backward
bindkey -k down history-search-forward
alias ls ls -sGF
alias rm rm -i
alias srm srm -i
alias mv mv -i

alias twics cd ~/Documents/tschessfeils_new/twics_new
alias mysql /usr/local/mysql/bin/mysql
alias mysqladmin /usr/local/mysql/bin/mysqladmin


set path = (/usr/local/mysql/bin $path)
set path = (/usr/local/bin $path)
set path = (/sw/include $path)
set path = (/usr/local/sbin $path)


alias files ls -lF \*/..namedfork/data \*/..namedfork/rsrc

test -r /sw/bin/init.csh  source /sw/bin/init.csh

***

To export the right PERL5LIB, can I add the following line to ~/.tcshrc

set PERL5LIB = (/System/Library/Perl/5.10.0:/Library/Perl/5.10.0)

?

Syntax seems alright, but I have still the /sw path at the beginning:

%ENV:

PERL5LIB=/sw/lib/perl5:/sw/lib/perl5/darwin:/System/Library/Perl/5.10.0:/Library/Perl/5.10.0

And in @INC too:

@INC:
/sw/lib/perl5/5.10.0/darwin-thread-multi-2level
/sw/lib/perl5/5.10.0
/sw/lib/perl5/darwin-thread-multi-2level
/sw/lib/perl5
/sw/lib/perl5/darwin
/System/Library/Perl/5.10.0/darwin-thread-multi-2level
/System/Library/Perl/5.10.0
/Library/Perl/5.10.0/darwin-thread-multi-2level
/Library/Perl/5.10.0
/Library/Perl/Updates/5.10.0/darwin-thread-multi-2level
/Library/Perl/Updates/5.10.0
/System/Library/Perl/5.10.0/darwin-thread-multi-2level
/System/Library/Perl/5.10.0
/Library/Perl/5.10.0/darwin-thread-multi-2level
/Library/Perl/5.10.0
/Network/Library/Perl/5.10.0/darwin-thread-multi-2level
/Network/Library/Perl/5.10.0
/Network/Library/Perl
/System/Library/Perl/Extras/5.10.0/darwin-thread-multi-2level
/System/Library/Perl/Extras/5.10.0

Sorry for this long email.


marek


Re: New Perl-Installation on new OS X

2011-06-09 Thread Sherm Pendley
On Thu, Jun 9, 2011 at 6:43 AM, Marek Stepanek
marekstepa...@yahoo.co.uk wrote:

 But perhaps this list could help me, to get @INC and $PERL5LIB clean of /sw
 ... How is it possible, that I have $PERL5LIB set to

 %ENV:
    PERL5LIB=/sw/lib/perl5:/sw/lib/perl5/darwin

 I only see two files:

        ~/.profile

 and

        ~/.tcshrc

PERL5LIB can be set in either one; which one is executed depends on
what shell you're using. The current default shell is Bash, which
reads .profile - at one point in ancient history, the default was
Tcsh, which reads .tcshrc.

 in the first file I only have one line:

        test -r /sw/bin/init.sh  . /sw/bin/init.sh

If you haven't changed your default shell, that's the culprit. It
executes Fink's init.sh script, which exports the PERL5LIB environment
variable. Again, this behavior goes back a while - they used to think
it was a good idea for the system Perl to be able to see modules that
Fink had installed under /sw/lib.

I haven't used Fink in a while - I switched to MacPorts - but I
*thought* they stopped doing that after a few Mac OS X releases, each
with a new version of Perl that disagreed with those modules, showed
them how problematic that was. If you've been migrating for a while,
that line in .profile could be a remnant from an old install.

At any rate, delete (# or comment) that line, exit from the shell
session and start a new one, and that should clear up your PERL5LIB
variable.

 To export the right PERL5LIB, can I add the following line to ~/.tcshrc

 set PERL5LIB = (/System/Library/Perl/5.10.0:/Library/Perl/5.10.0)

That wouldn't accomplish anything - PERL5LIB just adds to the default
paths, and the above are already in the default.

 Syntax seems alright, but I have still the /sw path at the beginning:

Did you log out of the current shell session, and back in? These
startup files are only processed when you start a new shell session,
not every time they're changed.

sherm--

-- 
Cocoa programming in Perl:
http://camelbones.sourceforge.net


Re: New Perl-Installation on new OS X

2011-06-09 Thread Daniel Staal
--As of June 8, 2011 5:39:57 PM -0400, Sherm Pendley is alleged to have 
said:



Blaming other people for your ignorance is a habit with you, isn't it?
Yes, I'm responsible for who *I* send emails to. I'm not responsible
for who the list sends emails to. A correctly-configured list will
look at the To: and CC: headers of any mail it receives, and won't
send an additional copy to anyone who's already received one.


--As for the rest, it is mine.

I'd argue that's a broken list, as it doesn't send me mail with the list 
headers.


There are major arguments over the technically correct solution.  Let's not 
get into them here.  Suffice it to say, if someone asks you to not CC them 
when you send to the list, it's polite not to.  (At least for that 
discussion.)


Daniel T. Staal

---
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---


Re: New Perl-Installation on new OS X

2011-06-09 Thread Sherm Pendley
On Thu, Jun 9, 2011 at 7:40 AM, Daniel Staal dst...@usa.net wrote:

 Suffice it to say, if someone asks you to not CC them
 when you send to the list, it's polite not to.  (At least for that
 discussion.)

In general, I'd agree - but I also think it's appropriate to consider
the tone  reason for the request. By the time John got around to
that, I had already debunked his theory about Fink, and asked him to
stop the off-topic digressions about overpriced Mac hardware. I
suspect he was just upset about that, and looking for any excuse to
complain about something.

sherm--

-- 
Cocoa programming in Perl:
http://camelbones.sourceforge.net


Re: New Perl-Installation on new OS X

2011-06-09 Thread Marek Stepanek


Thank you Sherm!

This is a step in the right direction. But my cpanplus Perl is still 
broken, with messages like:


Unable to create a new distribution object for 'Archive::Tar', although 
I have no /sw in the %ENV or @INC any more.


% perl -V

even does not show a %ENV at all. This is certainly not right, isn't it? 
In the @INC is now:


@INC:
/Library/Perl/Updates/5.10.0/darwin-thread-multi-2level
/Library/Perl/Updates/5.10.0
/System/Library/Perl/5.10.0/darwin-thread-multi-2level
/System/Library/Perl/5.10.0
/Library/Perl/5.10.0/darwin-thread-multi-2level
/Library/Perl/5.10.0
/Network/Library/Perl/5.10.0/darwin-thread-multi-2level
/Network/Library/Perl/5.10.0
/Network/Library/Perl
/System/Library/Perl/Extras/5.10.0/darwin-thread-multi-2level
/System/Library/Perl/Extras/5.10.0

the .profile is not changing anything, whether I remove it or not. And 
the X11 terminal is not working any more, not finding the path. If I put 
back the line


test -r /sw/bin/init.csh  source /sw/bin/init.csh

into my ~/.tchrc the X11-terminal (Fink) is working again. But I have 
back in my % perl -V


%ENV:

PERL5LIB=/sw/lib/perl5:/sw/lib/perl5/darwin:/System/Library/Perl/5.10.0:/Library/Perl/5.10.0

Probably I will leave the apple Perl it as it is, and make a new install 
of perl-5.14.0 under /usr/local



Thank you again



marek






Re: New Perl-Installation on new OS X

2011-06-09 Thread Vic Norton
I recently installed Fink to see if it had pdffonts. This conversation has 
scared me; I have uninstalled Fink. I certainly don't want to start looking for 
Perl modules in /sw.

Now I see no PERL5LIB in %ENV. I guess Perl is looking in
  /System/Library/Perl/5.10.0
  /Library/Perl/5.10.0
  /System/Library/Perl/Extras/5.10.0
but I really don't know.

Regards,

Vic


On Jun 9, 2011, at 7:08 AM, Sherm Pendley wrote:

 On Thu, Jun 9, 2011 at 6:43 AM, Marek Stepanek
 marekstepa...@yahoo.co.uk wrote:
 
 But perhaps this list could help me, to get @INC and $PERL5LIB clean of /sw
 ... How is it possible, that I have $PERL5LIB set to
 
 %ENV:
PERL5LIB=/sw/lib/perl5:/sw/lib/perl5/darwin
 
 I only see two files:
 
~/.profile
 
 and
 
~/.tcshrc
 
 PERL5LIB can be set in either one; which one is executed depends on
 what shell you're using. The current default shell is Bash, which
 reads .profile - at one point in ancient history, the default was
 Tcsh, which reads .tcshrc.
 
 in the first file I only have one line:
 
test -r /sw/bin/init.sh  . /sw/bin/init.sh
 
 If you haven't changed your default shell, that's the culprit. It
 executes Fink's init.sh script, which exports the PERL5LIB environment
 variable. Again, this behavior goes back a while - they used to think
 it was a good idea for the system Perl to be able to see modules that
 Fink had installed under /sw/lib.
 
 I haven't used Fink in a while - I switched to MacPorts - but I
 *thought* they stopped doing that after a few Mac OS X releases, each
 with a new version of Perl that disagreed with those modules, showed
 them how problematic that was. If you've been migrating for a while,
 that line in .profile could be a remnant from an old install.
 
 At any rate, delete (# or comment) that line, exit from the shell
 session and start a new one, and that should clear up your PERL5LIB
 variable.
 
 To export the right PERL5LIB, can I add the following line to ~/.tcshrc
 
 set PERL5LIB = (/System/Library/Perl/5.10.0:/Library/Perl/5.10.0)
 
 That wouldn't accomplish anything - PERL5LIB just adds to the default
 paths, and the above are already in the default.
 
 Syntax seems alright, but I have still the /sw path at the beginning:
 
 Did you log out of the current shell session, and back in? These
 startup files are only processed when you start a new shell session,
 not every time they're changed.
 
 sherm--
 
 -- 
 Cocoa programming in Perl:
 http://camelbones.sourceforge.net



Re: New Perl-Installation on new OS X

2011-06-09 Thread John Delacour

At 16:14 +0100 09/06/2011, Marek Stepanek wrote:

Probably I will leave the apple Perl it as it is, and make a new 
install of perl-5.14.0 under /usr/local


That is what I do, so that the two installations are independent. I 
configure simply like this:


cd downloaded_directory
./Configure -de -Dperladmin=em...@addr.com -Dcf_email=em...@addr.com
make
make test
sudo make install

Others may have more elaborate configuration suggestions but this 
works fine for me.


If I want to use the latest perl I change the shebang accordingly.

One thing to remember, of course, is that to add modules with cpan to 
5.14.0 so configured, rather than to Apple's installation, you need to


cd /usr/local/bin; sudo ./cpan

JD




Re: New Perl-Installation on new OS X

2011-06-09 Thread Charlie Garrison

Good morning,

On 9/06/11 at 4:40 PM +0100, John Delacour j...@bd8.com wrote:

One thing to remember, of course, is that to add modules with 
cpan to 5.14.0 so configured, rather than to Apple's 
installation, you need to


cd /usr/local/bin; sudo ./cpan


I haven't followed all of this thread (it was digressing there 
for a while). Would perlbrew be a solution for the OP. I've only 
been using it a short while but it makes installing and using a 
custom perl very simple.


http://search.cpan.org/perldoc?perlbrew

Eg:

$ perlbrew install perl-5.14.0
$ perlbrew switch perl-5.14.0
$ cpan 

Works a treat for me.


Charlie

--
   Ꮚ Charlie Garrison ♊ garri...@zeta.org.au

O ascii ribbon campaign - stop html mail - www.asciiribbon.org
〠  http://www.ietf.org/rfc/rfc1855.txt



Re: New Perl-Installation on new OS X

2011-06-09 Thread Sherm Pendley
On Thu, Jun 9, 2011 at 8:14 AM, Marek Stepanek
marekstepa...@yahoo.co.uk wrote:

 Thank you Sherm!

 This is a step in the right direction. But my cpanplus Perl is still broken,
 with messages like:

 Unable to create a new distribution object for 'Archive::Tar', although I
 have no /sw in the %ENV or @INC any more.

To be honest, I wouldn't have expected removing the /sw directories
from @INC to fix anything. That's why I told John that worrying about
Fink was pointless - there was nothing in your original report that
suggested it might have been the source of the problem.

Have you checked permissions on ~/.cpan? The error message sounds like
it can't download and/or unpack the Archive::Tar package. If you're
not running the CPAN shell as root (and you shouldn't be!), try making
sure that the .cpan directory and everything under it is owned and
writable by your user:

cd ~
sudo chown -R your_username .cpan
chmod -R g+w .cpan

You need sudo for the chown because, if anything is owned by someone
else, you'll need root authority to change its ownership.

 even does not show a %ENV at all. This is certainly not right, isn't it?

That doesn't mean you have no environment variables at all, just none
that Perl cares about. (If you recall, it was only showing PERL5LIB
before, even though you probably had a lot more than that.)

sherm--

-- 
Cocoa programming in Perl:
http://camelbones.sourceforge.net


Re: New Perl-Installation on new OS X

2011-06-09 Thread Sherm Pendley
On Thu, Jun 9, 2011 at 10:55 AM, Vic Norton v...@norton.name wrote:
 I recently installed Fink to see if it had pdffonts. This conversation has 
 scared me; I have uninstalled Fink. I certainly don't want to start looking 
 for Perl modules in /sw.

Fear is the mind-killer. :-)

Understanding what Fink does, and does NOT do, is key here. It doesn't
damage or modify your system Perl in any way. All it does is add a
single environment variable that Perl (any Perl, not just Apple's)
looks for when it starts up.

If you want the rest of Fink, but don't want its changes to PERL5LIB,
just undo them. Leave the call to its init.sh in your .profile, and
immediately after that, add a line that overrides its changes to
PERL5LIB:

export PERL5LIB=''

sherm--

-- 
Cocoa programming in Perl:
http://camelbones.sourceforge.net


Re: New Perl-Installation on new OS X

2011-06-09 Thread Sherm Pendley
On Thu, Jun 9, 2011 at 11:54 AM, Charlie Garrison garri...@zeta.org.au wrote:
 Good morning,

 I haven't followed all of this thread (it was digressing there for a while).
 Would perlbrew be a solution for the OP. I've only been using it a short
 while but it makes installing and using a custom perl very simple.

I've been meaning to check that out. It must do more than what I think
it does, because installing a new Perl is already pretty simple:

./Configure -des --prefix=/where/ever
make
make test
sudo make install

I'll have to read up on it (thanks for the link) to see what else it does...

sherm--

-- 
Cocoa programming in Perl:
http://camelbones.sourceforge.net


Re: New Perl-Installation on new OS X

2011-06-09 Thread Wayne Brissette

 I haven't followed all of this thread (it was digressing there for a while).
 Would perlbrew be a solution for the OP. I've only been using it a short
 while but it makes installing and using a custom perl very simple.

I installed the preconfigured version from active state recently and was 
pleasantly surprised at how it took care of pretty much everything. That might 
be another option for the original poster. 

Wayne



Re: New Perl-Installation on new OS X

2011-06-09 Thread Chas. Owens
On Thu, Jun 9, 2011 at 13:22, Sherm Pendley sherm.pend...@gmail.com wrote:
 On Thu, Jun 9, 2011 at 11:54 AM, Charlie Garrison garri...@zeta.org.au 
 wrote:
 Good morning,

 I haven't followed all of this thread (it was digressing there for a while).
 Would perlbrew be a solution for the OP. I've only been using it a short
 while but it makes installing and using a custom perl very simple.

 I've been meaning to check that out. It must do more than what I think
 it does, because installing a new Perl is already pretty simple:

    ./Configure -des --prefix=/where/ever
    make
    make test
    sudo make install

 I'll have to read up on it (thanks for the link) to see what else it does...
snip

The main feature is that it downloads and installs whatever version
you ask it to install.  The second feature is that it manages more
than one copy of perl for you.  So, say you have a work version of
perl that is at 5.8.8 and a home version that is at 5.14.0.  You can
say

perlbrew install perl-5.8.8
perlbrew install perl-5.14.0
perlbrew switch perl-5.14.0

At this point the version of perl found in the PATH will be 5.14.0

perlbrew switch perl-5.8.8

Now, the version of perl found in the PATH will be 5.8.8

Let's go further and say your work has a web code and backend code.
Different modules are installed in each environment.  You can say

perlbrew install perl-5.8.8 --as web
perlbrew install perl-5.8.8 --as backend

You can then switch between them like this

perlbrew switch web
perlbrew switch backend

Any modules you install with cpan, cpanp, or cpanm (hint: use
perlbrew install-cpanm to get cpanm easily and globally for all of
the managed perls) will only get installed in the current version.

If patchperl is installed (and it gets installed by the install script
from the POD), it will allow you to build older versions of perl that
break on newer machines.

That is about all it does, but that can be incredibly useful.
-- 
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.