Re: BBEdit-Perl confusion

2003-10-19 Thread drieux
On Thursday, Oct 16, 2003, at 06:56 US/Pacific, Vic Norton wrote:

I have recently installed Perl 5.8.0 on my iMac via PortsManager from
DarwinPorts http://www.opendarwin.org/projects/darwinports/. Perl  
5.8.0
resides in the /opt/local/bin directory, and this directory is at the
beginning of $PATH. Everything works well except that BBEdit seems  
rather
confused. Any suggestions as to how to rectify this confusion would be
appreciated.
p0: have you set up a

	$HOME/.MaxOSX/environment.plist

that would contain say:

?xml version=1.0 encoding=UTF-8?
!DOCTYPE plist SYSTEM  
file://localhost/System/Library/DTDs/PropertyList.dtd
plist version=0.9
dict
keyPATH/key
string  
/opt/local/bin:/home/drieux/bin:/usr/local/bin:/usr/bin:/bin:/usr/ 
local/sbin:/usr/sbin:/sbin:/usr/X11R6/bin/string
keyMANPATH/key
 
string/home/drieux/man:/usr/local/share/man:/usr/share/man/string
/dict
/plist

This way the Aqua GUI would be launched knowing about your alternative
directory structure. bbedit is probably picking up a 'default' path
from the GUI when you launch it, hence would most likely be running
the 'default' perl from /usr/bin/perl.
p1: it is interesting that the 'run in terminal' option would
be invoking an alternative version of perl... DUH! hold on, IF
bbedit started with what it thought was the definition, then it
would have invoked perl on the file
	perl your_file_here

hence it would have been the /usr/bin/perl (???) version vice
the 'first in the path found' version of perl.


ciao
drieux
---



Re: BBEdit-Perl confusion

2003-10-17 Thread Michael Maibaum
On Friday, October 17, 2003, at 02:20  am, Doug McNutt wrote:

At 16:12 -0700 10/16/03, Ingles, Juan W. wrote:
I wonder: Is this because
/opt/local/bin/perl   points to the perl 5.6 binary
or
5.6 binary path is hard coded in BBEdit
I don't have any /opt/local/bin/. None was created by the CPAN perl 
5.8 install in July 2002

which perl
on the terminal will tell you what binary you are launching
It just says /usr/bin/perl and says nothing about what it links to.


FWIW (as the maintanier of the dports perl port) We deliberately do not 
replace the system (/usr/bin/perl) binary. If you want to use perl 
5.8.x via darwinports as your 'system' perl you should remove 
/usr/bin/perl and replace it with a symlink to ${prefix}/bin/perl 
(usually /opt/local/bin/perl).

I've been meaning to add a 'switch_perl' shell script similar to the 
one used in freebsd to semi-automate this for those that want it.

Also, I've just updated the perl port to 5.8.1, with the previously 
discussed fix for the DBD::mysql issues.

hth

Michael

--
Michael Maibaum
internet: [EMAIL PROTECTED]|http://mike.maibaum.org
voice: [m] 07958 604025|
--
Michael Maibaum
internet: [EMAIL PROTECTED]|http://mike.maibaum.org
voice: [m] 07958 604025|


Re: BBEdit-Perl confusion

2003-10-16 Thread Doug McNutt
At 09:56 -0400 10/16/03, Vic Norton wrote:
I have recently installed Perl 5.8.0 on my iMac via PortsManager from
DarwinPorts http://www.opendarwin.org/projects/darwinports/. Perl 5.8.0
resides in the /opt/local/bin directory, and this directory is at the
beginning of $PATH. Everything works well except that BBEdit seems rather
confused.

BBEdit is almost surely executing perl 5.6 and it's probably because of a hard coded 
path.

I had 5.8 running, with some difficulty, over a year ago from the CPAN distribution 
and it is in /opt/. But I had to remove 5.6 from the other directories. It was an 
interesting experience while I learned about gzip and tar to preserve my options.

You'll be OK after that so long as the link in /usr/bin/perl points to the new 
version. Some have complained about Apple's installer requiring the old perl 5.6 but 
it has never bitten me.

-- 
--  There are 10 kinds of people:  those who understand binary, and those who don't 
--


Re: BBEdit-Perl confusion

2003-10-16 Thread Vic Norton
I guess there is no fix right now.

But actually the bug is somewhat convenient. Now a BBEdit script starting with
#!/opt/local/bin/perl -w
# Perl 5.8
uses Perl 5.8.0 with its @INC list if Run from BBEdit and
uses Perl 5.6.0 with a different @INC list if Run in Terminal.
It's not all bad---though it is a bit confusing.

Regards,

Vic

At 12:03 PM -0400 10/16/03, Bare Bones Software Technical Support wrote:
There is a bug in BBEdit where run in terminal hard codes the path 
to perl as /usr/bin/perl instead of taking the other usual steps to 
choose which interpreter to run. I have a bug logged and this will 
be corrected for the next release.
At 9:56 AM -0400 10/16/03, Vic Norton wrote:
I have recently installed Perl 5.8.0 on my iMac via PortsManager from
DarwinPorts http://www.opendarwin.org/projects/darwinports/. Perl 5.8.0
resides in the /opt/local/bin directory, and this directory is at the
beginning of $PATH. Everything works well except that BBEdit seems rather
confused. Any suggestions as to how to rectify this confusion would be
appreciated.



RE: BBEdit-Perl confusion

2003-10-16 Thread Ingles, Juan W.
I wonder: Is this because 
/opt/local/bin/perl   points to the perl 5.6 binary
or 
5.6 binary path is hard coded in BBEdit



 which perl
on the terminal will tell you what binary you are launching



( not currently at my machine to check )
juan

-Original Message-
From: Vic Norton [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 16, 2003 2:46 PM
To: [EMAIL PROTECTED]
Subject: Re: BBEdit-Perl confusion

I guess there is no fix right now.

But actually the bug is somewhat convenient. Now a BBEdit script
starting with
 #!/opt/local/bin/perl -w
 # Perl 5.8
uses Perl 5.8.0 with its @INC list if Run from BBEdit and
uses Perl 5.6.0 with a different @INC list if Run in Terminal.

It's not all bad---though it is a bit confusing.

Regards,

Vic

At 12:03 PM -0400 10/16/03, Bare Bones Software Technical Support wrote:
There is a bug in BBEdit where run in terminal hard codes the path 
to perl as /usr/bin/perl instead of taking the other usual steps to 
choose which interpreter to run. I have a bug logged and this will 
be corrected for the next release.

At 9:56 AM -0400 10/16/03, Vic Norton wrote:
I have recently installed Perl 5.8.0 on my iMac via PortsManager from
DarwinPorts http://www.opendarwin.org/projects/darwinports/. Perl
5.8.0
resides in the /opt/local/bin directory, and this directory is at the
beginning of $PATH. Everything works well except that BBEdit seems
rather
confused. Any suggestions as to how to rectify this confusion would be
appreciated.



Re: BBEdit-Perl confusion

2003-10-16 Thread Conrad Schilbe
On 10/16/03 5:12 PM, Ingles, Juan W. [EMAIL PROTECTED] wrote:

 I wonder: Is this because
 /opt/local/bin/perl   points to the perl 5.6 binary
 or 
 5.6 binary path is hard coded in BBEdit

Would this be in a plist file for BBedit?

C.

 
 
 
 which perl
 on the terminal will tell you what binary you are launching
 
 
 
 ( not currently at my machine to check )
 juan
 
 -Original Message-
 From: Vic Norton [mailto:[EMAIL PROTECTED]
 Sent: Thursday, October 16, 2003 2:46 PM
 To: [EMAIL PROTECTED]
 Subject: Re: BBEdit-Perl confusion
 
 I guess there is no fix right now.
 
 But actually the bug is somewhat convenient. Now a BBEdit script
 starting with
#!/opt/local/bin/perl -w
# Perl 5.8
 uses Perl 5.8.0 with its @INC list if Run from BBEdit and
 uses Perl 5.6.0 with a different @INC list if Run in Terminal.
 
 It's not all bad---though it is a bit confusing.
 
 Regards,
 
 Vic
 
 At 12:03 PM -0400 10/16/03, Bare Bones Software Technical Support wrote:
 There is a bug in BBEdit where run in terminal hard codes the path
 to perl as /usr/bin/perl instead of taking the other usual steps to
 choose which interpreter to run. I have a bug logged and this will
 be corrected for the next release.
 
 At 9:56 AM -0400 10/16/03, Vic Norton wrote:
 I have recently installed Perl 5.8.0 on my iMac via PortsManager from
 DarwinPorts http://www.opendarwin.org/projects/darwinports/. Perl
 5.8.0
 resides in the /opt/local/bin directory, and this directory is at the
 beginning of $PATH. Everything works well except that BBEdit seems
 rather
 confused. Any suggestions as to how to rectify this confusion would be
 appreciated.



Re: BBEdit-Perl confusion

2003-10-16 Thread Conrad Schilbe
On 10/16/03 5:12 PM, Ingles, Juan W. [EMAIL PROTECTED] wrote:

 I wonder: Is this because
 /opt/local/bin/perl   points to the perl 5.6 binary
 or 
 5.6 binary path is hard coded in BBEdit
 
 
 
 which perl
 on the terminal will tell you what binary you are launching
 
 
 
 ( not currently at my machine to check )
 juan
 
 -Original Message-
 From: Vic Norton [mailto:[EMAIL PROTECTED]
 Sent: Thursday, October 16, 2003 2:46 PM
 To: [EMAIL PROTECTED]
 Subject: Re: BBEdit-Perl confusion
 
 I guess there is no fix right now.
 
 But actually the bug is somewhat convenient. Now a BBEdit script
 starting with
#!/opt/local/bin/perl -w
# Perl 5.8
 uses Perl 5.8.0 with its @INC list if Run from BBEdit and
 uses Perl 5.6.0 with a different @INC list if Run in Terminal.
 
 It's not all bad---though it is a bit confusing.
 
 Regards,
 
 Vic
 
 At 12:03 PM -0400 10/16/03, Bare Bones Software Technical Support wrote:
 There is a bug in BBEdit where run in terminal hard codes the path
 to perl as /usr/bin/perl instead of taking the other usual steps to
 choose which interpreter to run. I have a bug logged and this will
 be corrected for the next release.
 
 At 9:56 AM -0400 10/16/03, Vic Norton wrote:
 I have recently installed Perl 5.8.0 on my iMac via PortsManager from
 DarwinPorts http://www.opendarwin.org/projects/darwinports/. Perl
 5.8.0
 resides in the /opt/local/bin directory, and this directory is at the
 beginning of $PATH. Everything works well except that BBEdit seems
 rather
 confused. Any suggestions as to how to rectify this confusion would be
 appreciated.


I have now also found that running this command in Bbedit:

print `which perl`;

Produces the following error:

MANPATH: Undefined variable.

That is a very strange error to be produced by that command... I thought
maybe it was a problem using the `` syntax to execute via the shell so I
tried system() syntax, same results... I then thought maybe it was that
bbedit choked on any system command but,

print `echo test`;

Worked fine... Very strange must have something to do with a hard coded
environment in perl.

C.



RE: BBEdit-Perl confusion

2003-10-16 Thread Doug McNutt
At 16:12 -0700 10/16/03, Ingles, Juan W. wrote:
I wonder: Is this because
/opt/local/bin/perl   points to the perl 5.6 binary
or
5.6 binary path is hard coded in BBEdit

I don't have any /opt/local/bin/. None was created by the CPAN perl 5.8 install in 
July 2002

  which perl
on the terminal will tell you what binary you are launching

It just says /usr/bin/perl and says nothing about what it links to.

When I installed 5.8 I had to recreate the link for /usr/bin/perl manually and that 
fixed up almost everything but BBEdit 6.x was in vogue at the time and worksheets were 
brand new.

-- 
--  There are 10 kinds of people:  those who understand binary, and those who don't 
--