Installing Slash (dyld errors)

2003-02-06 Thread Christian Schneider
Hi,

I am trying to install Slash on Mac OS X with Perl 5.8.0. I can  
configure, make, install everything without problems and  
Apache/mod_perl seems to work fine. I cannot, however, use the Slash  
installation. To be precise, I cannot use Slash::Apache::User. With  
DYLD_PRINT_LIBRARIES turned on, I get the following output from Perl:

use Slash::Apache::User;
loading libraries for image:  
/usr/local/perl5-8/Library/Perl/5.8.0/darwin/auto/Fcntl/Fcntl.bundle
loading libraries for image:  
/usr/local/perl5-8/Library/Perl/5.8.0/darwin/auto/DBI/DBI.bundle
loading libraries for image:  
/usr/local/perl5-8/Library/Perl/5.8.0/darwin/auto/Digest/MD5/MD5.bundle
loading libraries for image:  
/usr/local/perl5-8/Library/Perl/5.8.0/darwin/auto/HTML/Parser/ 
Parser.bundle
loading libraries for image:  
/usr/local/perl5-8/Library/Perl/5.8.0/darwin/auto/Cwd/Cwd.bundle
loading libraries for image:  
/usr/local/perl5-8/Library/Perl/5.8.0/darwin/auto/Opcode/Opcode.bundle
loading libraries for image:  
/usr/local/perl5-8/Library/Perl/5.8.0/darwin/auto/IO/IO.bundle
loading libraries for image:  
/usr/local/perl5-8/Library/Perl/5.8.0/darwin/auto/XML/Parser/Expat/ 
Expat.bundle
loading library: /sw/lib/libexpat.0.dylib
loading libraries for image: /sw/lib/libexpat.0.dylib
loading libraries for image:  
/usr/local/perl5-8/Library/Perl/5.8.0/darwin/auto/Socket/Socket.bundle
loading libraries for image:  
/usr/local/perl5-8/Library/Perl/5.8.0/darwin/auto/MIME/Base64/ 
Base64.bundle
loading libraries for image:  
/usr/local/perl5-8/Library/Perl/5.8.0/darwin/auto/POSIX/POSIX.bundle
loading libraries for image:  
/usr/local/perl5-8/Library/Perl/5.8.0/darwin/auto/Slash/Apache/ 
Apache.bundle
dyld: /usr/local/perl5-8/bin/perl Undefined symbols:
_ap_add_module
_ap_find_linked_module
_ap_null_cleanup
_ap_palloc
_ap_register_cleanup
_ap_remove_module
_perl_clear_symtab
_perl_cmd_perl_FLAG
_perl_cmd_perl_TAKE1
_perl_cmd_perl_TAKE2
_perl_get_startup_pool
_perl_perl_cmd_cleanup
Trace/BPT trap

I tried fink rebuild expat but that didn't help either. I tried the  
installation using the Perl 5.8 tutorial at Apple's and I tried it  
using Nathan's Perl-distribution (thank you, Nathan!). I'm afraid I  
have next to no knowledge about XS and don't really understand the  
setup with auto and bundle, any reading recommendation? And any ideas  
on resolving the issues above?


Best regards,

Christian



Re: dmg of perl 5.8.0 on Mac OS X

2003-02-06 Thread Phil Dobbin
On 6/2/03 1:03, Nathan Torkington [EMAIL PROTECTED] wrote:

 Please download and test the perl 5.8.0 distribution available from:
 http://nathan.torkington.com/tmp/perl5.8.0gnat1.dmg

[...]

I get a text transfer of the binary when trying to d/l this in Mozilla, IE
and Omni Web instead of the disk image. This is the first time this has
happened for a long time and I can't remember how to fix it. Anybody?

 With the help of Fink, I managed to totally trash my system.  I
 reinstalled yesterday, and went through the hassle of building Perl
 5.8.0 all over again.  I figured I'd save other folks that hassle.

Ugh! At the risk of veering wildly OT, what happened (must be my day for
questions ;-)?

Regards,

Phil.
 




Re: dmg of perl 5.8.0 on Mac OS X

2003-02-06 Thread Morbus Iff
 Please download and test the perl 5.8.0 distribution available from:
 http://nathan.torkington.com/tmp/perl5.8.0gnat1.dmg

I get a text transfer of the binary when trying to d/l this in Mozilla, IE
and Omni Web instead of the disk image. This is the first time this has
happened for a long time and I can't remember how to fix it. Anybody?

 wget http://nathan.torkington.com/tmp/perl5.8.0gnat1.dmg

:)


--
Morbus Iff ( i'm the droid you're looking for )
Culture: http://www.disobey.com/ and http://www.gamegrene.com/
Please Me: http://www.amazon.com/exec/obidos/wishlist/25USVJDH68554
icq: 2927491 / aim: akaMorbus / yahoo: morbus_iff / jabber.org: morbus




Re: dmg of perl 5.8.0 on Mac OS X

2003-02-06 Thread Phil Dobbin
On 6/2/03 14:30, Morbus Iff [EMAIL PROTECTED] wrote:

 Please download and test the perl 5.8.0 distribution available from:
 http://nathan.torkington.com/tmp/perl5.8.0gnat1.dmg
 
 I get a text transfer of the binary when trying to d/l this in Mozilla, IE
 and Omni Web instead of the disk image. This is the first time this has
 happened for a long time and I can't remember how to fix it. Anybody?
 
 wget http://nathan.torkington.com/tmp/perl5.8.0gnat1.dmg

I'm still using 10.1.5:

bash2.05 phil@localhost ~ $ whereis wget
bash2.05 phil@localhost ~ $ whereis curl
/usr/bin/curl

So it looks like `curl'

;-)

Regards,

Phil.




Re: dmg of perl 5.8.0 on Mac OS X

2003-02-06 Thread Morbus Iff
 wget http://nathan.torkington.com/tmp/perl5.8.0gnat1.dmg

I'm still using 10.1.5:

bash2.05 phil@localhost ~ $ whereis wget
bash2.05 phil@localhost ~ $ whereis curl
/usr/bin/curl

Aaah, yeah, I forgot all about that. I hate how they replaced wget with 
curl - drives me absolutely batty, as curl can't seem (or rather, I've 
never gotten it) to follow Redirect's properly. It'll either loop xx times, 
then die, or loop xx times and segfault. Stupid flipping curl.

wget is, however, available through fink and as a .dmg.


--
Morbus Iff ( i'm the droid you're looking for )
Culture: http://www.disobey.com/ and http://www.gamegrene.com/
Please Me: http://www.amazon.com/exec/obidos/wishlist/25USVJDH68554
icq: 2927491 / aim: akaMorbus / yahoo: morbus_iff / jabber.org: morbus



Re: dmg of perl 5.8.0 on Mac OS X

2003-02-06 Thread Drew Taylor
At 09:36 PM 2/5/03 -0800, Michael Maibaum wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


On Wednesday, February 5, 2003, at 08:37 PM, Chris Nandor wrote:


Now, who is going to do a dmg of Apache / mod_perl / libapreq?  :-)


We'll be providing .pkg and .mpkgs shortly, and the packages that there 
are already are availible over webdav or from the website (webdav address 
is http://packages.opendarwin.org/) These packages are still in testing at 
the moment...

Perhaps this is a stupid question, but could someone explain the difference 
between a disk image (dmg) and a package (pkg)? I know the dmg mounts a 
virtual drive, but other than that which is better?

Drew

--
Drew Taylor| Web development  consulting
http://www.drewtaylor.com/ | perl/mod_perl/DBI/mysql/postgres
--
Netflix: DVD Rentals by mail with NO late fees or due dates!
Free Trial - http://www.netflix.com/Default?mqso=36126240
--



Re: dmg of perl 5.8.0 on Mac OS X

2003-02-06 Thread Michael Maibaum
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


On Thursday, February 6, 2003, at 07:37 AM, Drew Taylor wrote:


At 09:36 PM 2/5/03 -0800, Michael Maibaum wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


On Wednesday, February 5, 2003, at 08:37 PM, Chris Nandor wrote:


Now, who is going to do a dmg of Apache / mod_perl / libapreq?  :-)


We'll be providing .pkg and .mpkgs shortly, and the packages that 
there are already are availible over webdav or from the website 
(webdav address is http://packages.opendarwin.org/) These packages 
are still in testing at the moment...

Perhaps this is a stupid question, but could someone explain the 
difference between a disk image (dmg) and a package (pkg)? I know the 
dmg mounts a virtual drive, but other than that which is better?


The dmg usually contains a .pkg  which is run once the dmg is mounted.


Michael
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.1 (Darwin)

iD8DBQE+QokPilk3LUlIL0MRAgSEAJ47Z7Tpf9LSaQvVVIxk4AozeUMY7wCfVL0g
DLk1TXq7RQ+xz9rcSGhi3lI=
=qcWT
-END PGP SIGNATURE-




Re: dmg of perl 5.8.0 on Mac OS X

2003-02-06 Thread Nathan Torkington
Drew Taylor writes:
 Perhaps this is a stupid question, but could someone explain the difference 
 between a disk image (dmg) and a package (pkg)? I know the dmg mounts a 
 virtual drive, but other than that which is better?

A .dmg is a file containing a filesystem, kinda like a .iso for CD-ROM
filesystems.  A .dmg can contain programs that you run directly from
the disk image.  This is how Mozilla is shipped--no installer, just a
folder you drag to your Applications directory.  A .dmg doesn't even
have to contain programs--I could ship a .dmg of images, text files,
anything.

A .pkg is specifically just a distribution of files to be installed
using the Installer program.  You can add pre- and post- actions to a
package (which I should have done for Perl--update your .cshrc to add
/usr/local/perl5-8 to the path).  The prompting for admin password,
confirming acceptance of the license, selecting the drive to install
on ... all that's done by the Installer program in response to
instructions in the .pkg file.

I used .pkg instead of .dmg because Perl's location is hard-coded in
the binary, so it *has* to go into /usr/local/perl5-8.  If I'd just
given you a filesystem, you could have copied it anywhere and then
filled my mailbox with you suck, Torkington! email :-)

Nat




Re: dmg of perl 5.8.0 on Mac OS X

2003-02-06 Thread Puneet Kishor

On Thursday, February 6, 2003, at 09:37  AM, Drew Taylor wrote:


At 09:36 PM 2/5/03 -0800, Michael Maibaum wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


On Wednesday, February 5, 2003, at 08:37 PM, Chris Nandor wrote:


Now, who is going to do a dmg of Apache / mod_perl / libapreq?  :-)


We'll be providing .pkg and .mpkgs shortly, and the packages that 
there are already are availible over webdav or from the website 
(webdav address is http://packages.opendarwin.org/) These packages 
are still in testing at the moment...

Perhaps this is a stupid question, but could someone explain the 
difference between a disk image (dmg) and a package (pkg)? I know the 
dmg mounts a virtual drive, but other than that which is better?


a package is a way of putting several things together into one 
bundle. An application package contains all the things the 
application needs to run (the binary executable, the preflists, icons 
and other resources, nibs, help files, etc.). An installer package 
contains the different things required to make an application run 
successfully, but those things may need to go to different locations on 
the hard drive. For example, the gimp package at darwinports puts 
together all the nonsense required by gimp to run successfully 
(actually, it leaves out gtk and gtk2, but that is another story), so 
that ignoramuses like me can one click install -- like magic, 
everything goes to its correct place, and then it works.

A disk image is just a way to deliver the package. You could just as 
well stuffit the package and supply that. Perhaps even uuencode it and 
send it in an annoyingly long email accessible via elm...



Re: dmg of perl 5.8.0 on Mac OS X

2003-02-06 Thread Phil Dobbin
On 6/2/03 14:30, Morbus Iff [EMAIL PROTECTED] wrote:

 Please download and test the perl 5.8.0 distribution available from:
 http://nathan.torkington.com/tmp/perl5.8.0gnat1.dmg
 
 I get a text transfer of the binary when trying to d/l this in Mozilla, IE
 and Omni Web instead of the disk image. This is the first time this has
 happened for a long time and I can't remember how to fix it. Anybody?
 
 wget http://nathan.torkington.com/tmp/perl5.8.0gnat1.dmg

Curiouser and curiouser...

I tried `curl http://nathan.torkington.com/tmp/perl5.8.0gnat1.dmg'

And got the same binary text d/l (and had to crash `terminal' to stop it :-(

Hmm...

Regards,

Phil.




Re: dmg of perl 5.8.0 on Mac OS X

2003-02-06 Thread Morbus Iff
I tried `curl http://nathan.torkington.com/tmp/perl5.8.0gnat1.dmg'
And got the same binary text d/l (and had to crash `terminal' to stop it :-(

Curl, by default, will spit to STDOUT (ie. your Terminal) not to a file. 
I'm not in front of a OS X box right now, but I believe you've got to do:

 curl -O http://nathan.torkington.com/tmp/perl5.8.0gnat1.dmg




--
Morbus Iff ( i'm the droid you're looking for )
Culture: http://www.disobey.com/ and http://www.gamegrene.com/
Please Me: http://www.amazon.com/exec/obidos/wishlist/25USVJDH68554
icq: 2927491 / aim: akaMorbus / yahoo: morbus_iff / jabber.org: morbus



Re: setenv LANG in v5.8

2003-02-06 Thread Robin

On Wednesday, February 5, 2003, at 08:51 AM, Pavel Stranak wrote:

Perl 5.6 works fine with ANY LC_ALL and any LANG in the same shell.  
How is it possible?


having gone through this problem a while back, and piecing the jigsaw  
together  I surmised that
Apple does some compile time magic to get these two global variables to  
set.

Setting these as shell environment variables works as long as you run  
your scripts under a shell - scripts run as cron jobs will start  
complaining becase they use the system wide environment. How to solve  
this problem along with a perl script which does it all for you can be  
found in the archives of this list:
http://www.omnigroup.com/mailman/archive/macosx-admin/2002-September/ 
025590.html under the seach friendly subject Locale setting errors -  
LC_ALL, LANG

I would further add that perl complains if you don't set LC_ALL to C  
because not all locale issues are connected to text processing, a lot  
of numeric functions depend on locale - so unless you wish to use say  
roman numerals instead of decimals, you shouldn't have any real need  
for any other locale definition beyond the standard C library. LANG you  
can set to whatever you wish I believe*, as this aids perl in its text  
processing abilities, though I haven't tried setting this to anything  
other than English.


* provided it is an existising local definition


HTH

Robin








Re: dmg of perl 5.8.0 on Mac OS X

2003-02-06 Thread pkeidesis
Phil Dobbin wrote:

On 6/2/03 14:30, Morbus Iff [EMAIL PROTECTED] wrote:



Please download and test the perl 5.8.0 distribution available from:
http://nathan.torkington.com/tmp/perl5.8.0gnat1.dmg


I get a text transfer of the binary when trying to d/l this in Mozilla, IE
and Omni Web instead of the disk image. This is the first time this has
happened for a long time and I can't remember how to fix it. Anybody?


wget http://nathan.torkington.com/tmp/perl5.8.0gnat1.dmg



Curiouser and curiouser...

I tried `curl http://nathan.torkington.com/tmp/perl5.8.0gnat1.dmg'

And got the same binary text d/l (and had to crash `terminal' to stop it :-(



from my cygwin version (should be the same on OS X) --

C:\htdocs\eidesis\cgi-bincurl --help
curl 7.9.8 (i686-pc-cygwin) libcurl 7.9.8 (OpenSSL 0.9.6g)
Usage: curl [options...] url
Options: (H) means HTTP/HTTPS only, (F) means FTP only
 -a/--appendAppend to target file when uploading (F)
 -A/--user-agent string User-Agent to send to server (H)
 -b/--cookie name=string/file Cookie string or file to read cookies 
from (H)
 -B/--use-ascii Use ASCII/text transfer
 -c/--cookie-jar file Write all cookies to this file after operation (H)
 -C/--continue-at offset Specify absolute resume offset
 -d/--data data   HTTP POST data (H)
--data-ascii data   HTTP POST ASCII data (H)
--data-binary data  HTTP POST binary data (H)
--disable-epsv  Prevents curl from using EPSV (F)
 -D/--dump-header file Write the headers to this file
--egd-file file EGD socket path for random data (SSL)
 -e/--referer   Referer page (H)
 -E/--cert cert[:passwd] Specifies your certificate file and password 
(HTTPS)
--cert-type type Specifies certificate file type (DER/PEM/ENG) 
(HTTPS)
--key key Specifies private key file (HTTPS)
--key-type type Specifies private key  file type (DER/PEM/ENG) 
(HTTPS)
--pass  pass  Specifies passphrase for the private key (HTTPS)
--engine eng  Specifies the crypto engine to use (HTTPS)
--cacert file CA certifciate to verify peer against (SSL)
--capath directory CA directory (made using c_rehash) to verify
peer against (SSL, NOT Windows)
--ciphers list What SSL ciphers to use (SSL)
--connect-timeout seconds Maximum time allowed for connection
 -f/--fail  Fail silently (no output at all) on errors (H)
 -F/--form name=content Specify HTTP POST data (H)
 -g/--globoff   Disable URL sequences and ranges using {} and []
 -G/--get   Send the -d data with a HTTP GET (H)
 -h/--help  This help text
 -H/--header line Custom header to pass to server. (H)
 -i/--include   Include the HTTP-header in the output (H)
 -I/--head  Fetch document info only (HTTP HEAD/FTP SIZE)
 -j/--junk-session-cookies Ignore session cookies read from file (H)
--interface interface Specify the interface to be used
--krb4 level  Enable krb4 with specified security level (F)
 -K/--configSpecify which config file to read
 -l/--list-only List only names of an FTP directory (F)
 -L/--location  Follow Location: hints (H)
 -m/--max-time seconds Maximum time allowed for the transfer
 -M/--manualDisplay huge help text
 -n/--netrc Must read .netrc for user name and password
--netrc-optional  Use either .netrc or URL; overrides -n
 -N/--no-buffer Disables the buffering of the output stream
 -o/--output file Write output to file instead of stdout
 -O/--remote-name   Write output to a file named as the remote file
 -p/--proxytunnel   Perform non-HTTP services through a HTTP proxy
 -P/--ftpport address Use PORT with address instead of PASV when 
ftping (F)
 -q When used as the first parameter disables .curlrc
 -Q/--quote cmd   Send QUOTE command to FTP before file transfer (F)
 -r/--range range Retrieve a byte range from a HTTP/1.1 or FTP server
 -R/--remote-time   Set the remote file's time on the local output
 -s/--silentSilent mode. Don't output anything
 -S/--show-errorShow error. With -s, make curl show errors when 
they occur
--stderr file Where to redirect stderr. - means stdout.
 -t/--telnet-option OPT=val Set telnet option
--trace file  Dump a network/debug trace to the given file
--trace-ascii file  Like --trace but without the hex output
 -T/--upload-file file Transfer/upload file to remote site
--url URL Another way to specify URL to work with
 -u/--user user[:password] Specify user and password to use
Overrides -n and --netrc-optional
 -U/--proxy-user user[:password] Specify Proxy authentication
 -v/--verbose   Makes the operation more talkative
 -V/--version   Outputs version number then quits
 -w/--write-out [format] What to output after completion
 -x/--proxy host[:port]  Use proxy. (Default port is 1080)
--random-file file File to use for reading random data from (SSL)
 -X/--request command Specific request command to use
 -y/--speed-timeTime 

Re: dmg of perl 5.8.0 on Mac OS X

2003-02-06 Thread Bruce Van Allen
Hey Nat -- Thanks. Downloaded and installed just fine on my t?rusty 
G4-350, OS X 10.2.3.

I've been under a major deadline until last week, so I've just been 
watching everyone's travails with upgrading their OS X Perl 
installation. I took the risk of upgrading to Jaguar when it came out, 
but decided to wait on messing with Perl, even though I'd been running 
5.6.1 pre-jag.

This week I had just replaced my system Perl with 5.6.1 when you posted 
this. So now I have both 'good' versions of Perl available. For now 
5.8.0 is just for fun and my own local tools -- my applications are on 
too many machines with older distributions -- pre-millennial, even...

After all the comments about downloading and wget/curl problems, I just 
wanted to let you know that, at least for one person, it worked out of 
the box, er, dmg.

Did notice the DB_File version is:
# /usr/local/perl5-8/Library/Perl/5.8.0/darwin/DB_File.pm
# last modified 22nd October 2002
# version 1.806

Typo in your announcement?
On Wednesday, February 5, 2003, at 05:03  PM, Nathan Torkington wrote:
It installs Perl, Berkeley DB 4.1.25, DB_File 1.42 and Time::HiRes
1.42 into /usr/local/perl5-8.  You'll need to add


Thanks!

  - Bruce

__bruce__van_allen__santa_cruz__ca__




Re: dmg of perl 5.8.0 on Mac OS X

2003-02-06 Thread Phil Dobbin
On 6/2/03 16:58, Morbus Iff [EMAIL PROTECTED] wrote:

 I tried `curl http://nathan.torkington.com/tmp/perl5.8.0gnat1.dmg'
 And got the same binary text d/l (and had to crash `terminal' to stop it :-(
 
 Curl, by default, will spit to STDOUT (ie. your Terminal) not to a file.
 I'm not in front of a OS X box right now, but I believe you've got to do:
 
 curl -O http://nathan.torkington.com/tmp/perl5.8.0gnat1.dmg

Thanks, Morbus, it now works fine

Teach me not to read the manpage...

Regards,

Phil.




(CB) selecting text from an NSTableView

2003-02-06 Thread Rich Morin
I'm using an NSTableView to display a bunch of text.  Selecting a
row causes an explanation to appear in an accompanying NSTextView.
I'm able to select text from the latter, but not from the former.

I suspect that this is simply a characteristic of the NSTableView
(using selections to cause actions precludes using them to grab
text) and that I'll have to figure out a workaround, but does anyone
have any comments or suggestions to offer?

-r
--
email: [EMAIL PROTECTED]; phone: +1 650-873-7841
http://www.cfcl.com/rdm- my home page, resume, etc.
http://www.cfcl.com/Meta   - The FreeBSD Browser, Meta Project, etc.
http://www.ptf.com/dossier - Prime Time Freeware's DOSSIER series
http://www.ptf.com/tdc - Prime Time Freeware's Darwin Collection



Camelbones outline view data sources

2003-02-06 Thread Tom Insam
does anyone have an example of a class implementing a datasource for 
an outline view? Table views I understand and have working, but I'm 
not getting very far with the outline views, and the PB docs aren't 
as helpful as for the table views...

Ideally I'd like a class that just wraps a perl hash tree and makes 
it available to the view, but even simple working code would be nice..

Tom


Re: Creating Fat XS Modules

2003-02-06 Thread Dan Sugalski
At 9:54 AM -0800 2/6/03, Mark Alldritt wrote:

Hi Folks,

I have an XS Perl module that I need to distribute in binary form as part of
a larger Mac OS X application.  However, because I want to support Perl 5.6
and 5.8 and these two versions are not binary compatible, I'm looking for a
way to package 5.6 and 5.8 builds of my module.  Can anyone offer any
suggestions on how to do this?


I'm not sure this is that feasable. It's easy enough to build a 5.6.0 
perl module, because Apple ships that with OS X and you can link 
against it OK. 5.8.0, though, will be a custom build, and it'll be 
tough to make sure you build your XS module against a perl with the 
same options as the 5.8.0 the user's custom-built. Choose something 
wrong (multiplicity, threads, 64-bitness) and you'll fail reasonably 
badly, unfortunately.
--
Dan

--it's like this---
Dan Sugalski  even samurai
[EMAIL PROTECTED] have teddy bears and even
  teddy bears get drunk


Re: Creating Fat XS Modules

2003-02-06 Thread drieux

On Thursday, Feb 6, 2003, at 09:54 US/Pacific, Mark Alldritt wrote:


Hi Folks,

I have an XS Perl module that I need to distribute in binary form as 
part of
a larger Mac OS X application.  However, because I want to support 
Perl 5.6
and 5.8 and these two versions are not binary compatible, I'm looking 
for a
way to package 5.6 and 5.8 builds of my module.  Can anyone offer any
suggestions on how to do this?

the simplest way is to have your source code build
under two different perl's - if you have the usual
Makefile.pl that would normally start with

	perl Makefile.pl
	make

then what you can do is generate your makefile with

	/usr/bin/perl5.6.1 Makefile.pl
	make

	do the voodoo for pulling out your 'binary only' set

then make it again with

	/usr/bin/perl5.8.0 Makefile.pl

	{ repeat here for the make of the binary only set }

Since it is identifying the 'perl' that is used when
spinning out the Makefile that is the important part.

You can also look at a trick we use, which is that
we have all of the perl modules in a separate place
and a 'common' architeture specific arch file that
we include into an upper level makefile that defines
which perl we are using to make the makefiles.

HTH



ciao
drieux

---




Re: dmg of perl 5.8.0 on Mac OS X

2003-02-06 Thread Nathan Torkington
Puneet Kishor writes:
 On a related note -- Nat, please, if you could summarize how fink 
 trashed your system so much that you had to reinstall... that might be 
 as great a help as creating a perl dmg. Fink makes a very big issue of 
 how it protects your system by installing under /sw, and remaining 
 separate from the system. Seems like while it does all that, it also 
 has to capability of hosing the system.

It's only suspicion on my part, because it's six months of compiling
software.  I think the big hassle came with my upgrading to the latest
Fink--I think that broke the Perl I'd installed, which had
inadvertently trashed the system Perl.

However, I'd several times interrupted fink attempting to compile
things from source, and I wonder whether one of those might have give
me the GNU du in /usr/bin instead of in /sw.  I'm not certain enough
to blame fink for that.

 why?

I could have lived with a messy Fink upgrade.  I'd just rm -rf /sw
and reinstall.  I could also have lived with a broken Perl.  I'd
just rm -rf /Library/Perl and /System/Library/Perl and reinstall
Perl.  But finding a stray du in /usr/bin scared the crap out of
me, and at that point I didn't know how much of my system was no
longer standard.

Anyone else could live with that.  I have to edit books where we
claim that things work a particular way on OS X.  We've already
been bitten--fink's du has a -h option that Apple's du doesn't,
and without realizing it we described -h in Learning Unix for
Mac OS X, 2ed.  So I really need a clean sane system.

Nat




Re: Camelbones outline view data sources

2003-02-06 Thread Rich Morin
At 5:58 PM + 2/6/03, Tom Insam wrote:

does anyone have an example of a class implementing a datasource for
an outline view? Table views I understand and have working, but I'm
not getting very far with the outline views, and the PB docs aren't
as helpful as for the table views...

Ideally I'd like a class that just wraps a perl hash tree and makes
it available to the view, but even simple working code would be
nice..


What he said...  I'm also planning to use an outline view, so some
help along those lines would be most useful.

-r
--
email: [EMAIL PROTECTED]; phone: +1 650-873-7841
http://www.cfcl.com/rdm- my home page, resume, etc.
http://www.cfcl.com/Meta   - The FreeBSD Browser, Meta Project, etc.
http://www.ptf.com/dossier - Prime Time Freeware's DOSSIER series
http://www.ptf.com/tdc - Prime Time Freeware's Darwin Collection



Re: setenv LANG in v5.8

2003-02-06 Thread Robin

On Wednesday, February 5, 2003, at 08:51 AM, Pavel Stranak wrote:

Perl 5.6 works fine with ANY LC_ALL and any LANG in the same shell.  
How is it possible?


having gone through this problem a while back, and piecing the jigsaw  
together  I surmised that
Apple does some compile time magic to get these two global variables to  
set.

Setting these as shell environment variables works as long as you run  
your scripts under a shell - scripts run as cron jobs will start  
complaining becase they use the system wide environment. How to solve  
this problem along with a perl script which does it all for you can be  
found in the archives of this list:
http://www.omnigroup.com/mailman/archive/macosx-admin/2002-September/ 
025590.html under the seach friendly subject Locale setting errors -  
LC_ALL, LANG

I would further add that perl complains if you don't set LC_ALL to C  
because not all locale issues are connected to text processing, a lot  
of numeric functions depend on locale - so unless you wish to use say  
roman numerals instead of decimals, you shouldn't have any real need  
for any other locale definition beyond the standard C library. LANG you  
can set to whatever you wish I believe*, as this aids perl in its text  
processing abilities, though I haven't tried setting this to anything  
other than English.


* provided it is an existising locale definition


HTH

Robin



Re: dmg of perl 5.8.0 on Mac OS X

2003-02-06 Thread Nathan Torkington
Bruce Van Allen writes:
 After all the comments about downloading and wget/curl problems, I just 
 wanted to let you know that, at least for one person, it worked out of 
 the box, er, dmg.

That is good to know, thanks!  (Maybe I should add an installer
shell script that curl's a page to let me know that someone
successfully installed it :-)

 Did notice the DB_File version is:
 # /usr/local/perl5-8/Library/Perl/5.8.0/darwin/DB_File.pm
 # last modified 22nd October 2002
 # version 1.806
 
 Typo in your announcement?

Yes, braino on my part.  Good catch!

Thanks,

Nat




Re: dmg of perl 5.8.0 on Mac OS X

2003-02-06 Thread Heather Madrone
At 4:55 PM + 2/6/03, Phil Dobbin wrote:
On 6/2/03 14:30, Morbus Iff [EMAIL PROTECTED] wrote:

 Please download and test the perl 5.8.0 distribution available from:
 http://nathan.torkington.com/tmp/perl5.8.0gnat1.dmg

 I get a text transfer of the binary when trying to d/l this in Mozilla, IE
 and Omni Web instead of the disk image. This is the first time this has
 happened for a long time and I can't remember how to fix it. Anybody?

 wget http://nathan.torkington.com/tmp/perl5.8.0gnat1.dmg

Curiouser and curiouser...

I tried `curl http://nathan.torkington.com/tmp/perl5.8.0gnat1.dmg'

And got the same binary text d/l (and had to crash `terminal' to stop it :-(

I think you need to use the -o flag with a filename as an argument to send
the output to a file instead of stdout.  Or redirect it via .

-- 
Heather Madrone  ([EMAIL PROTECTED])  http://www.madrone.com
If we're not having fun, we're not doing it right.



Re: Re: dmg of perl 5.8.0 on Mac OS X

2003-02-06 Thread John Adams
 Bruce Van Allen writes:

 After all the comments about downloading and wget/curl
 problems, I just wanted to let you know that, at least for one
 person, it worked out of the box, er, dmg.

I went you one better--after it installed it, I fired up CPAN and installed 
Class::DBI, along with its copious dependencies. Other than stopping in the middle 
when I went to bed last night, it went fine.

Thanks,

  John A
  see me fulminate at http://www.jzip.org/



Re: macosx Digest 6 Feb 2003 19:38:59 -0000 Issue 304

2003-02-06 Thread Paul Hoffman
Nathan Torkington wrote:


However, I'd several times interrupted fink attempting to compile
things from source, and I wonder whether one of those might have give
me the GNU du in /usr/bin instead of in /sw.  I'm not certain enough
to blame fink for that. [...] But finding a stray du in /usr/bin
scared the crap out of me, and at that point I didn't know how much
of my system was no longer standard.


Are you running Jaguar?  I'm on 10.2.3 and have /usr/bin/du too,
not /sw/du, but it doesn't look like a problem.  In fact, fink
doesn't even list a du package.

% which du
/usr/bin/du

% ls -al /sw/du
ls: /sw/du: No such file or directory

% fink --version
Package manager version: 0.11.2
Distribution version: 0.5.1.cvs

% fink list du
Information about 2124 packages read in 6 seconds.
[yadda yadda, du not listed]

% more /sw/etc/fink.conf
# Fink configuration, initially created by bootstrap.pl
Basepath: /sw
RootMethod: sudo
Trees: local/main stable/main stable/crypto local/bootstrap 
unstable/main unstable/crypto
Distribution: 10.2
[blah blah blah]

% uname -a
Darwin [my host name] 6.3 Darwin Kernel
Version 6.3: Sat Dec 14 03:11:25 PST 2002;
root:xnu/xnu-344.23.obj~4/RELEASE_PPC  Power Macintosh powerpc

% ls -l /usr/bin/du
-r-xr-xr-x  1 root  wheel  14172 Dec 26 08:10 /usr/bin/du

% ls -l /usr/bin | grep 'Dec 26 08:10' | wc -l
 386

% ls -l /usr/bin | grep -v 'Dec 26 08:10' | wc -l
 183

So what happened at 8:10 on December 26?  The 386 binaries
last modified then include ar, at, awk, basename, biff, bison,
chgrp (but not chown), cmp, diff, etc.

OTOH, the 183 files with other mod. dates include apropos,
autoconf, gcc, gdb, java, nroff, osascript, etc.

Anyone else could live with that.  I have to edit books where we
claim that things work a particular way on OS X.  We've already
been bitten--fink's du has a -h option that Apple's du doesn't,
and without realizing it we described -h in Learning Unix for
Mac OS X, 2ed.  So I really need a clean sane system.


Nasty.  FWIW, my du doesn't have -h:

% du -h
du: illegal option -- h
usage: du [-H | -L | -P] [-a | -s] [-ckx] [file ...]

HTH in some small way, even though it's too late for you.

Paul.

--
Paul Hoffman :: Taubman Medical Library :: Univ. of Michigan
[EMAIL PROTECTED] :: [EMAIL PROTECTED] :: http://www.nkuitse.com/




A small Type and Creator weirdness

2003-02-06 Thread Rich Morin
I'm using MacOSX::File::Info to get the Type and Creator codes for files.
In trying to print these (e.g., via NSLog and in an NSTextView), I ran
into a peculiar symptom: not only did the code not print, any following
information on the line also disappeared.

After a bit of research, I confirmed that the creator and type methods
were returning a string of four nulls when no real code was available.
This is probably normal behavior in Macland, but it's distinctly non-
Perlish.  Sigh.

Anyway, my workaround was to generate my own string of four nulls,
which I could use to check return values:

  my $null = \000\000\000\000;

  $tmp = $finfo-creator;
  $tmp = '' if ($tmp eq $null);
  row('  Creator', '$tmp');

  $tmp = $finfo-type;
  $tmp = '' if ($tmp eq $null);
  row('  Type', '$tmp');

-r
--
email: [EMAIL PROTECTED]; phone: +1 650-873-7841
http://www.cfcl.com/rdm- my home page, resume, etc.
http://www.cfcl.com/Meta   - The FreeBSD Browser, Meta Project, etc.
http://www.ptf.com/dossier - Prime Time Freeware's DOSSIER series
http://www.ptf.com/tdc - Prime Time Freeware's Darwin Collection



Re: Creating Fat XS Modules

2003-02-06 Thread Ken Williams

On Thursday, February 6, 2003, at 10:14  AM, Sherm Pendley wrote:

Something like this:

BEGIN {
if ($^V =~ /5.6/) {
use lib /Library/AppName/Perl5_6;
} elsif ($^V =~ /5.8/) {
use lib /Library/AppName/Perl5_8;
} else {
die Unknown Perl version found.;
}
}

use My::Module;



For the archive record, that won't work, because 'use' is done at 
compile-time (here, the compile-time of the BEGIN block, which is 
Compile Man's compile-time), before the if() statement has a chance to 
work.

In other words, look at this test case:


[junior:~/bin/test] ken% cat use.pl
#!/usr/bin/perl

BEGIN {
  $foo = 5;
  if ($foo) {
use lib FOO;
  } else {
use lib NOT_FOO;
  }
}

print $_\n foreach @INC;

[junior:~/bin/test] ken% perl use.pl
NOT_FOO
FOO
/sw/lib/perl5/5.6.1/darwin
/sw/lib/perl5/5.6.1
/Library/Perl/darwin
/Library/Perl
.


But the following does work:


[junior:~/bin/test] ken% cat use.pl
#!/usr/bin/perl

BEGIN {
  $foo = 5;
  if ($foo) {
unshift @INC, FOO;
  } else {
unshift @INC, NOT_FOO;
  }
}

print $_\n foreach @INC;

[junior:~/bin/test] ken% perl use.pl
FOO
/sw/lib/perl5/5.6.1/darwin
/sw/lib/perl5/5.6.1
/Library/Perl/darwin
/Library/Perl
/Library/Perl
.



 -Ken



Re: dmg of perl 5.8.0 on Mac OS X

2003-02-06 Thread Paul Corr
Nathan Torkington wrote:

Are you running Jaguar?  I'm on 10.2.3 and have /usr/bin/du too,
not /sw/du, but it doesn't look like a problem.  In fact, fink
doesn't even list a du package.

% which du
/usr/bin/du

% ls -al /sw/du
ls: /sw/du: No such file or directory


The fileutils package includes a number of shell utilities. I seem to 
remember reading that some packages preferred if it was installed.

% dpkg --listfiles fileutils | egrep du
/sw/bin/du
/sw/share/man/man1/du.1

This would be the one with the -h option Nat mentioned.

Paul


Re: A small Type and Creator weirdness

2003-02-06 Thread Peter N Lewis
At 16:44 -0800 6/2/03, Rich Morin wrote:

I'm using MacOSX::File::Info to get the Type and Creator codes for files.
In trying to print these (e.g., via NSLog and in an NSTextView), I ran
into a peculiar symptom: not only did the code not print, any following
information on the line also disappeared.

After a bit of research, I confirmed that the creator and type methods
were returning a string of four nulls when no real code was available.
This is probably normal behavior in Macland, but it's distinctly non-
Perlish.  Sigh.


File types and creators are arbitrary binary 4 byte numbers.  It is 
only by convention that they are reasonably textish, and also by 
Apple's decree, you can't use creators or types that are all 
lowercase letters unless you're Apple.  They can certainly contain 
weird characters such as control characters and high bit set 
characters.

Also, Perl has no problem with strings containing such characters - 
indeed perl can easily deal with strings that contain four arbitrary 
bytes.  So it is not non-Perlish at all.

It is non-C-ish to treat arbitrary binary data as a string because C 
strings are nul terminated and thus cannot contain zero bytes.

Interestingly, it is also not non-Pascalish because Pascal, like 
Perl, can have arbitrary binary data in strings (although Pascal is 
typically limited to 255 characters in strings, unlike Perl).  This 
is why under traditional Mac OS which was heavily Pascal based, file 
names could have any character, including nul, except colon (:) in 
them, although it was not at all recomended to do such a thing.

So your solution is inadequate.  You probably want to convert any 
bogus characters to perhaps . or ?, eg:

$tmp = $finfo-creator;
$tmp =~ tr/ -~/?/c;

Alternatively, convert it to \123 notation.

$tmp =~ s/([^ -~])/\\.sprintf(%03o,ord($1))/ge;

Enjoy,
   Peter.


Anyway, my workaround was to generate my own string of four nulls,
which I could use to check return values:

  my $null = \000\000\000\000;

  $tmp = $finfo-creator;
  $tmp = '' if ($tmp eq $null);
  row('  Creator', '$tmp');

  $tmp = $finfo-type;
  $tmp = '' if ($tmp eq $null);
  row('  Type', '$tmp');

-r
--
email: [EMAIL PROTECTED]; phone: +1 650-873-7841
http://www.cfcl.com/rdm- my home page, resume, etc.
http://www.cfcl.com/Meta   - The FreeBSD Browser, Meta Project, etc.
http://www.ptf.com/dossier - Prime Time Freeware's DOSSIER series
http://www.ptf.com/tdc - Prime Time Freeware's Darwin Collection



--
http://www.interarchy.com/  http://download.interarchy.com/



Re: A small Type and Creator weirdness

2003-02-06 Thread Rich Morin
At 11:44 AM +0800 2/7/03, Peter N Lewis wrote:

File types and creators are arbitrary binary 4 byte numbers.  ...


Thanks for the clarification!  I now print the values both as
sanitized text and in hex:

# ftype - format type (or creator) value
#
sub ftype {
my ($code) = @_;

my (@t,
$tmp1, $tmp2);

($tmp1 = $code) =~ s|([^ -~])|.|g;

@t = unpack('C4', $code);
$tmp2 = sprintf(%02x%02x%02x%02x, $t[0], $t[1], $t[2], $t[3]);

return('$tmp1' (0x$tmp2));
}

Thus:

  Creator   'MACS' (0x4d414353)
  Type  'fdrp' (0x66647270)

and

  Creator   '' (0x)
  Type  '' (0x)

-r
--
email: [EMAIL PROTECTED]; phone: +1 650-873-7841
http://www.cfcl.com/rdm- my home page, resume, etc.
http://www.cfcl.com/Meta   - The FreeBSD Browser, Meta Project, etc.
http://www.ptf.com/dossier - Prime Time Freeware's DOSSIER series
http://www.ptf.com/tdc - Prime Time Freeware's Darwin Collection