Re: LWP install

2002-10-31 Thread Charles Jacobson

After a couple of hours I found my way thru CPAN getting one missing 
module at a time. It appears that the warning messages just point out 
things you can install afterwards though. The URI and HeadParser aka 
the HTML module are pretty much required. Base64 and FTP seem not to 
be used for LWP::simple.

My understanding (possibly wrong) is that if there is a budle available 
(i.e. Bundle::LWP) that will install any needed prereqs too. Is this 
correct? I just installed Bundle::Slash and it seemed to download all 
the necessary modules.

BTW, if anyone has Slash going on their system please email me. I have 
it installed and would like some advice on how to set it up. Thanks!

Apologies to Doug for him getting this twice.
-
Chuck Jacobson, Technical Systems Specialist
North Central Baptist Church, Gainesville, FL
http://www.northcentralbaptist.org/
-
I've written a commercial for Apple Computer. It goes like this: 
Macintosh . . . we might not get everything right, but at least we knew 
the century was going to end. - Douglas Adams


Directory path error

2002-10-31 Thread Shannon Murdoch
Hi all,

Was wondering if anyone had experienced this problem before:

When specifying a directory to glob in MacOS X it malfunctions if the path
contains a space ie. /Users/sydneyshan/University of Newcastle/*

Is there any way around this without needing to replace the directory's
spaces with underscores etc?

Cheers,
-Shannon Murdoch




Re: Directory path error

2002-10-31 Thread Charles Albrecht
At 2:57 AM +1100 11/1/2002, Shannon Murdoch wrote:
When specifying a directory to glob in MacOS X it malfunctions if the path
contains a space ie. /Users/sydneyshan/University of Newcastle/*

Is there any way around this without needing to replace the directory's
spaces with underscores etc?

The standard ways are either quoting the entire string or escaping the spaces:

'/Users/sydneyshan/University of Newcastle/*'
 /Users/sydneyshan/University\ of\ Newcastle/*

When dragging from the Finder to Terminal, OS X uses the second approach.

-Charles
 Euonymic Solutions
 [EMAIL PROTECTED]



How do you install modules in OS X?

2002-10-31 Thread Vic Norton
Hello all,

I got a new iMac a few of weeks ago. I've been using MacPerl on a Power
Computing tower until now. I'm a bit stymied by Perl on the iMac. My
primary problem is that I don't know how to install Perl modules. This was
easy in MacPerl. I just dropped the module on Chris Nandor's installme
droplet. (A future question: How do you make droplets in OS X?)

I have tried to install CPAN-1.63 by running cpan. I wasn't ready for
a manual configuration. I let cpan decide what to do.

The first thing cpan told me was that I didn't have unzip, make,
lynx, ncftpget, ncftp in PATH. Where can I get these? Are they
necessary? Larry Wall (Programming Perl, 3rd ed, p 553) seems to think
that make is quite important.

After writing /Users/vicnorton/.cpan/CPAN/MyConfig.pm cpan tried to
install Bundle::CPAN. First it asked me to install Net::FTP as soon as
possible. It continued by connecting to ftp.cpan.ddns.develooper.com.
Apparently it GOT /Users/vicnorton/.cpan/sources/authors/01mailrc.txt.gz,
but after this the process broke down. Cpan could no longer connect.

   ...
   226-File [01mailrc.txt.gz] successfully transferred
   226 1.556 seconds (measured here), 35.53 Kbytes per second
   56634 bytes received in 00:01 (30.04 KB/s)
   221-Goodbye. You uploaded 0 and downloaded 56 kbytes.
   221 Logout - CPU time spent: 0.000 seconds.
   GOT /Users/vicnorton/.cpan/sources/authors/01mailrc.txt.gz
   Going to read /Users/vicnorton/.cpan/sources/authors/01mailrc.txt.gz
   Issuing /usr/bin/ftp -n
   /usr/bin/ftp: No address associated with nodename
   Not connected.
   Local directory now /Users/vicnorton/.cpan/sources/modules
   Not connected.
   Not connected.
   Not connected.
   Not connected.
   Not connected.
   Not connected.
   Bad luck... Still failed!
   Can't access URL 
ftp://ftp.perl.org/pub/CPAN/modules/02packages.details.txt.gz.


 Please, install Net::FTP as soon as possible. CPAN.pm installs it for you
 if you just type
 install Bundle::libnet

   Please check, if the URLs I found in your configuration file () are valid.
   The urllist can be edited. E.g. with ``o conf urllist push ftp://myurl/''

   Cannot fetch modules/02packages.details.txt.gz

   Issuing /usr/bin/ftp -n
   /usr/bin/ftp: No address associated with nodename
   Not connected.
   Local directory now /Users/vicnorton/.cpan/sources/modules
   Not connected.
   Not connected.
   Not connected.
   Not connected.
   Not connected.
   Not connected.
   Bad luck... Still failed!
   Can't access URL ftp://ftp.perl.org/pub/CPAN/modules/03modlist.data.gz.


 Please, install Net::FTP as soon as possible. CPAN.pm installs it for you
 if you just type
 install Bundle::libnet

   Please check, if the URLs I found in your configuration file () are valid.
   The urllist can be edited. E.g. with ``o conf urllist push ftp://myurl/''

   Cannot fetch modules/03modlist.data.gz

   Can't install Bundle::CPAN, don't have an associated bundle file. :-(
at /System/Library/Perl/CPAN.pm line 1806

   cpan


So where do I go from here? I would have no problems downloading the files
that cpan couldn't, namely 02packages.details.txt.gz and
03modlist.data.gz, and uncompress them, but I wouldn't know what to do
with them after that.

Any advice would be greatly appreciated. Appropriate references would also
be nice. The URL http:www.cpan.org/modules/INSTALL.html doesn't seem to
know that Mac OS X exists, and, of course, it assumes you have make if
you are on a UNIX system.

Sorry for the length of this (my first) posting. I'm a bit frustrated.


Regards,

Vic

--
*---* mailto:vic;norton.name
| Victor Thane Norton, Jr.
| Mathematician and Motorcyclist
| phone: 419-353-3399
*---* http://vic.norton.name


Re: How do you install modules in OS X?

2002-10-31 Thread Sherm Pendley
On Thursday, October 31, 2002, at 12:16 PM, Vic Norton wrote:


easy in MacPerl. I just dropped the module on Chris Nandor's installme
droplet.


Easy it was (and is), but installme has its drawbacks. It doesn't 
download anything for you, and it doesn't figure out prerequisites for 
you.

 (A future question: How do you make droplets in OS X?)


Check out DropScript:

URL: http://www.mit.edu/people/wsanchez/software/


The first thing cpan told me was that I didn't have unzip, make,
lynx, ncftpget, ncftp in PATH. Where can I get these? Are they
necessary?


You need make, which is included in the developer tools. To install some 
modules, you'll also need the C compiler, which is also included in the 
dev tools.

Don't worry about the others; cpan searches out many alternative ways 
for accomplishing the same task, but needs only one. For example, lynx, 
ncftpget, and ncftp can be used to download files - but ftp, which you 
do have, works just as well.

After writing /Users/vicnorton/.cpan/CPAN/MyConfig.pm


You should run the cpan shell as root - otherwise, it won't be able to 
correctly install modules.

cpan tried to install Bundle::CPAN.


The cpan shell isn't psychic - it didn't try to install Bundle::CPAN 
on its own. You tried to do that.

Terminology nit-picking aside, that wasn't a bad idea - with one caveat. 
You should update the CPAN module by itself first, with install CPAN, 
and *then* install the CPAN bundle with install Bundle::CPAN.

The version of CPAN.pm shipped with OS X is over-zealous about 
installing prerequisites, and will try to install Perl 5.8.0 for you if 
you use it to install the bundle. Unfortunately, in doing so it 
overwrites the existing Perl, causing no end of problems.

 First it asked me to install Net::FTP as soon as possible.


If I recall correctly, that's included in Bundle::CPAN. Anyway, the cpan 
shell works without it, but it has to use an external tool for 
downloading files, which is sub-optimal.

 It continued by connecting to ftp.cpan.ddns.develooper.com.


The ddns name leads me to believe that this is a so-called dynamic 
dns site. What that means is, it doesn't have a static IP address, and 
uses software that automatically updates its dns entry each time its 
address changes.

I wouldn't use that as my first choice. Dynamic DNS is mostly used for 
giving cable-modem connected home servers a name, and such systems are 
notoriously unreliable.

Anyway, most of the problems you had look like network connectivity 
issues. If you're on dial-up, perhaps your connection dropped.

sherm--

If you listen to a UNIX shell, can you hear the C?



hard links on HFS+

2002-10-31 Thread Rich Morin
UFS has the notion of a hard link (i.e., a duplicate directory
entry somewhere in the same file system, typically for a file).
A key characteristic of hard links is that the modes and contents
of the file are shared by the link (because all directory entries
for a file point to the same inode).

I have tried creating hard links on an HFS+ file system and they
work (mostly) as expected.  I did find a peculiarity, however:

  % touch foo
  % ln foo foolink
  # Using Get Info, set the comment for foo.
  # Using Get Info, get the comment for foolink.

The comment, being stored in the .DS_Store file of foo's directory,
does not automatically get used for foolink.

I'd like to know whether any of the other HFS+ file attributes are
unique to the file, as opposed to being shared by all hard links to
the file.

-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: How do you install modules in OS X?

2002-10-31 Thread Pete Prodoehl

For creating droplets similar to how MacPerl did it, I use DropScript:

http://www.mit.edu/people/wsanchez/software/



Pete

Vic Norton wrote:

Hello all,


[snip]

 (A future question: How do you make droplets in OS X?)

[snip]


Regards,

Vic






Re: hard links on HFS+

2002-10-31 Thread Jim Correia
On Thursday, October 31, 2002, at 01:43  PM, Rich Morin wrote:


The comment, being stored in the .DS_Store file of foo's directory,
does not automatically get used for foolink.

I'd like to know whether any of the other HFS+ file attributes are
unique to the file, as opposed to being shared by all hard links to
the file.


I'm confused by your wording of other HFS+ file attributes when the 
only example you give is the comment, which by your own admission isn't 
an HFS+ file attribute.

As far as I can tell, all HFS+ attributes are shared because they 
really are the same file. To do otherwise would break the definition of 
hard link, wouldn't it?

Jim

--
Jim Correia
[EMAIL PROTECTED]



Re: How do you install modules in OS X?

2002-10-31 Thread Rich Allen
have you installed the dev tools?

- hcir

On Thursday, October 31, 2002, at 08:16 AM, Vic Norton wrote:


Hello all,

I got a new iMac a few of weeks ago. I've been using MacPerl on a Power

After writing /Users/vicnorton/.cpan/CPAN/MyConfig.pm cpan tried to
install Bundle::CPAN. First it asked me to install Net::FTP as soon 
as
possible. It continued by connecting to 
ftp.cpan.ddns.develooper.com.
Apparently it GOT 
/Users/vicnorton/.cpan/sources/authors/01mailrc.txt.gz,
but after this the process broke down. Cpan could no longer connect.

   ...
   226-File [01mailrc.txt.gz] successfully transferred
   226 1.556 seconds (measured here), 35.53 Kbytes per second
   56634 bytes received in 00:01 (30.04 KB/s)
   221-Goodbye. You uploaded 0 and downloaded 56 kbytes.
   221 Logout - CPU time spent: 0.000 seconds.
   GOT /Users/vicnorton/.cpan/sources/authors/01mailrc.txt.gz
   Going to read /Users/vicnorton/.cpan/sources/authors/01mailrc.txt.gz
   Issuing /usr/bin/ftp -n
   /usr/bin/ftp: No address associated with nodename
   Not connected.
   Local directory now /Users/vicnorton/.cpan/sources/modules
   Not connected.
   Not connected.
   Not connected.
   Not connected.
   Not connected.
   Not connected.
   Bad luck... Still failed!
   Can't access URL 
ftp://ftp.perl.org/pub/CPAN/modules/02packages.details.txt.gz.


 Please, install Net::FTP as soon as possible. CPAN.pm installs it 
for you
 if you just type
 install Bundle::libnet

   Please check, if the URLs I found in your configuration file () are 
valid.
   The urllist can be edited. E.g. with ``o conf urllist push 
ftp://myurl/''




Re: How do you install modules in OS X?

2002-10-31 Thread Ian Ragsdale
This is a bug in the version of CPAN that comes with perl 5.6.  If a module
is in the perl core distribution and you try to install or upgrade it (it's
possible that it moved into the core in a later version than 5.6) then that
version of CPAN will grab perl to install that module.  If you instead
download and install the latest version of CPAN by hand (if you try to use
CPAN you trigger the bug) then this will be fixed and it will grab only the
modules you specify, not the whole perl distribution.

Ian

On 10/31/02 2:52 PM, Trey Harris [EMAIL PROTECTED] wrote:

 In a message dated Thu, 31 Oct 2002, Sherm Pendley writes:
 The version of CPAN.pm shipped with OS X is over-zealous about
 installing prerequisites, and will try to install Perl 5.8.0 for you if
 you use it to install the bundle. Unfortunately, in doing so it
 overwrites the existing Perl, causing no end of problems.
 
 Which brings up a question that's been nagging at me.  There must be some
 way to tell CPAN, don't upgrade Perl unless I tell you to, and if some
 other module you're trying to install needs a new version of Perl, try to
 find an older version of the module that doesn't, isn't there?
 
 I've never bothered trying to track down this elusive (nonexistant?)
 option, since I use the 'ask' mode rather than the 'follow' mode for
 dependencies.  I just answer 'no' and go to search.cpan.org and work out
 the dependencies for myself. Annoying, but it works.  :-)
 
 Trey
 
 




Re: OS X meltdown

2002-10-31 Thread Ken Williams

On Wednesday, October 23, 2002, at 11:48  AM, Puneet Kishor wrote:

several reasons...
- putting a computer to sleep still consumes power.


Not very much.  I'm one of those people who only sleeps my iBook, I 
never turn it off.  The machine can go several days asleep without 
losing more than a tiny amount off the battery.  It's essentially the 
same as turned off - the battery seems to drain about the same amount 
when the machine is turned off.

- the computer seems to lose its tcp settings on wake... this was a 
known problem in OS 9, and I have personally experienced it in OS X... 
I wake up the computer and it doesn't know how to get out to the 
internet via my switch to DHCP-ed cable mode to the outside world. I 
have to log into the switch, release the ip address, and have the cable 
modem get a new lease.

Weird.  I use lots of different DHCP environments, and what seems to 
happen is that when I wake from sleep, the OS automatically renews its 
leases.  In fact, if I'm having network or video problems, closing the 
lid and re-opening it (after a few seconds) is a pretty dependable way 
of *fixing* problems.


- I may still want to turn off the computer.


Yup.  I do this when I get on an airplane, because they may want me to 
remove my battery at a moment's notice at the security screening.

 -Ken



Re: How do you install modules in OS X?

2002-10-31 Thread Vic Norton
Thanks for the help, everyone. I've spent much of the afternoon 
trying to find out how to get the Developer Tools CD that doesn't 
come with new Macs. After a couple of calls to Apple I was finally 
directed to http://developer.apple.com, but that didn't help much. 
To download the software I need to be registered. Apparently I am 
already registered, but the only passwords I can think of don't work. 
When I try to get help, they ask me for my birth date. I can remember 
that: April 22 (1935). Nope, Apple says, The authentication 
provided doesn't match our records.

Catch 22. I'm still in the same quandary. I can't make anything in OS X!

So I've bought a new machine whose system is crippled and which 
doesn't have the Developer CD that store-bought versions of OS X 
have. Well, my new 17 iMac looks nice, but I guess I'll be doing 
Perl on my Power Computing tower for a while. I have all the tools I 
need there.

Exercise, using Bit::Vector, find the one nonsquare multiple of 4 
less than 1 million that is not the sum of a square and a prime. I'd 
like to see how long this exercise takes on my new machine, but, 
unfortunately, I can't use Bit::Vector.

Regards,

Vic

--
*---* mailto:vic;norton.name
| Life is a jest; and all things show it.
| I thought so once; and now I know it.
|   My Own Epitaph - John Gay, 1689-1732
*---* http://vic.norton.name


Re: How do you install modules in OS X?

2002-10-31 Thread Trey Harris
How strange.  How sucky.  My iMac (15) came with Developer Tools.  My
Jaguar up-to-date upgrade came with Developer Tools, too.

Trey

In a message dated Thu, 31 Oct 2002, Vic Norton writes:

 Thanks for the help, everyone. I've spent much of the afternoon
 trying to find out how to get the Developer Tools CD that doesn't
 come with new Macs. After a couple of calls to Apple I was finally
 directed to http://developer.apple.com, but that didn't help much.
 To download the software I need to be registered. Apparently I am
 already registered, but the only passwords I can think of don't work.
 When I try to get help, they ask me for my birth date. I can remember
 that: April 22 (1935). Nope, Apple says, The authentication
 provided doesn't match our records.

 Catch 22. I'm still in the same quandary. I can't make anything in OS X!

 So I've bought a new machine whose system is crippled and which
 doesn't have the Developer CD that store-bought versions of OS X
 have. Well, my new 17 iMac looks nice, but I guess I'll be doing
 Perl on my Power Computing tower for a while. I have all the tools I
 need there.

 Exercise, using Bit::Vector, find the one nonsquare multiple of 4
 less than 1 million that is not the sum of a square and a prime. I'd
 like to see how long this exercise takes on my new machine, but,
 unfortunately, I can't use Bit::Vector.

 Regards,

 Vic






Re: How do you install modules in OS X?

2002-10-31 Thread Paul Goracke
Vic Norton wrote:


So I've bought a new machine whose system is crippled and which 
doesn't have the Developer CD that store-bought versions of OS X 
have. Well, my new 17 iMac looks nice, but I guess I'll be doing Perl 
on my Power Computing tower for a while. I have all the tools I need 
there.

Look for /Applications/Installers/Developer Tools

pg




Re: How do you install modules in OS X?

2002-10-31 Thread Geoffrey F. Green
On 10/31/02 5:26 PM, Vic Norton [EMAIL PROTECTED] wrote:

 Thanks for the help, everyone. I've spent much of the afternoon
 trying to find out how to get the Developer Tools CD that doesn't
 come with new Macs. After a couple of calls to Apple I was finally
 directed to http://developer.apple.com, but that didn't help much.
 To download the software I need to be registered. Apparently I am
 already registered, but the only passwords I can think of don't work.
 When I try to get help, they ask me for my birth date. I can remember
 that: April 22 (1935). Nope, Apple says, The authentication
 provided doesn't match our records.

I've heard that new Macs come with a disk image of the Developers Tool CD.
I'm not sure where it's located, though; perhaps in the Applications
Directory, in a folder called Installers, if my memory serves.

 - geoff




FW: How do you install modules in OS X?

2002-10-31 Thread Matthew Galaher
The following is typical of what I would write that would work as a droplet
in MacPerl but that seems to silently fail as a DropScript application. I'm
I misunderstanding what DropScript does? Surely I have some things to learn
about working with Perl in OS X. If any one can point me in the right
direction and or rewrite the following examples to work in DropScript, it
would be greatly appreciated. Thanks.

(email may change line breaks...)
first example:

#!user/bin/perl
foreach $file (@ARGV) {
my $newname = $file;
$newname =~ tr/A-Z/a-z/;
# change $newname
rename($file, $newname) or  
warn Couldn't rename $file to $newname: $!\n;
}

second example:

#!user/bin/perl -w
@files_dropped = @ARGV;
for (@files_dropped){
$_ =~ s!(.+):([^:]+)!$1:!;
opendir(DIR,$_);#look in the directory of those dropped files
@contents_each_dir = readdir(DIR);
for (@contents_each_dir){
print $_\n;
}
}


 --
 From: Pete Prodoehl
 Reply To: [EMAIL PROTECTED]
 Sent: Thursday, October 31, 2002 9:55 AM
 To:   [EMAIL PROTECTED]
 Subject:  Re: How do you install modules in OS X?
 
 
 For creating droplets similar to how MacPerl did it, I use DropScript:
 
  http://www.mit.edu/people/wsanchez/software/
 
 
 
 Pete
 
 Vic Norton wrote:
  Hello all,
  
 [snip]
   (A future question: How do you make droplets in OS X?)
 [snip]
  
  Regards,
  
  Vic
  
 
 



Re: How do you install modules in OS X?

2002-10-31 Thread Sherm Pendley
On Thursday, October 31, 2002, at 03:52 PM, Trey Harris wrote:


Which brings up a question that's been nagging at me.  There must be 
some
way to tell CPAN, don't upgrade Perl unless I tell you to, and if some
other module you're trying to install needs a new version of Perl, try 
to
find an older version of the module that doesn't, isn't there?

It's a bug, not a feature. :-)

The latest CPAN module doesn't have the bug. Also, when installed by 
itself, rather than as part of the Bundle::CPAN package, it has no 
dependencies that will trigger the bug in older versions.

That's why I advised installing the latest CPAN.pm first, separately 
from Bundle::CPAN - because the bundle _does_ have at least one such 
dependency.

sherm--

If you listen to a UNIX shell, can you hear the C?