OS X and perldoc

J

Justin C

I've recently bought a Mac, my first, and I'm still finding my way
around it. I'm also still finding my way around Perl; while I don't have
a lot of chance to use it I read a lot here and hope to pick things up.
Quite often questions are posted and the OP is directed to perldoc and
out of interest I follow. That was all well and good on my Linux box;
it's not so good here. There was a recent reference to perldoc perlop,
I've not read it all and I was interested in the answer to the OP's
question. It seems that there is only a partial perldoc install on this
machine, "perldoc -f" works, perldoc -m works, perldoc perldoc and
perldoc perlop don't (I can't think of others to try ... not without
perldoc perldoc anyway!).

Where can I go for information on how to fix this install?

Thank you for any help you can give.
 
D

David Squire

Justin said:
I've recently bought a Mac, my first, and I'm still finding my way
around it. I'm also still finding my way around Perl; while I don't have
a lot of chance to use it I read a lot here and hope to pick things up.
Quite often questions are posted and the OP is directed to perldoc and
out of interest I follow. That was all well and good on my Linux box;
it's not so good here. There was a recent reference to perldoc perlop,
I've not read it all and I was interested in the answer to the OP's
question. It seems that there is only a partial perldoc install on this
machine, "perldoc -f" works, perldoc -m works, perldoc perldoc and
perldoc perlop don't (I can't think of others to try ... not without
perldoc perldoc anyway!).

Where can I go for information on how to fix this install?

Thank you for any help you can give.

These two work just fine on my Mac (latest OS X). I didn't do anything
special to make that happen.

I have installed all the optional developer stuff (on my 1st
installation DVD), but I don't recall any Perl-specific stuff being
mentioned there.


DS
 
D

David H. Adler

If for some reason your Perl distribution is incomplete or you want to
have the absolute latest (Mac OS X currently comes with 5.8.6, whereas
5.8.8 and 5.9.4 are out), go to <http::www.cpan.org> and download the
latest source distribution. If you have installed the Mac OS X
optional developer tools (XCode) that came with your OS distribution
(or downloaded the latest from <http://www.apple.com/developer>), then
you should be able to build and install a complete Perl distribution.
The developer tools include a version of gcc for the Mac. There is a
README.macosx file in the Perl distribution with some information
about Mac-flavored Perl.

There is one LARGE caveat about that on OS X. Do NOT install your perl
over the one that comes with OS X. Apple tends to assume that the perl
the system came with is the one it's using for various things, and
changing that can cause subtle (and not so subtle) problems that can be
very annoying.

Fortunately, IIRC, the default for a perl built from source is to
install it into /usr/local/bin, rather than /usr/bin where Apple puts
theirs. Just make sure you're using /usr/local as your prefix and you
should be fine.

dha
 
S

Sherm Pendley

Justin C said:
I've recently bought a Mac, my first, and I'm still finding my way
around it. I'm also still finding my way around Perl; while I don't have
a lot of chance to use it I read a lot here and hope to pick things up.
Quite often questions are posted and the OP is directed to perldoc and
out of interest I follow. That was all well and good on my Linux box;
it's not so good here. There was a recent reference to perldoc perlop,
I've not read it all and I was interested in the answer to the OP's
question. It seems that there is only a partial perldoc install on this
machine, "perldoc -f" works, perldoc -m works, perldoc perldoc and
perldoc perlop don't (I can't think of others to try ... not without
perldoc perldoc anyway!).

Where can I go for information on how to fix this install?

Many of Perl's pods are included in the 'DevDocumentation.pkg' sub-package
of the Xcode install.

sherm--
 
S

Sherm Pendley

David Squire said:
These two work just fine on my Mac (latest OS X). I didn't do anything
special to make that happen.

Yes you did:
I have installed all the optional developer stuff

Don't know if I'd call that "special" or not, but that's what gave you the
missing pods. :)

sherm--
 
J

Justin C

Sherm Pendley said:
Many of Perl's pods are included in the 'DevDocumentation.pkg' sub-package
of the Xcode install.

Thanks Sherm, and everyone else. I haven't got around to checking out
the Xcode stuff yet; I was assuming that, as I had perl, I'd have the
documentation if the install was OK.

There I go making assumptions again.

And I've just noticed this newsreader isn't appending my .sig. Oh the
trial of a new OS!

#!/usr/bin/perl
use warnings ;
use strict ;

open SIG "<.sig" or die ;
while (<SIG>) {
print $_ . "\n" ;
}
close SIG ;

And what's more, the # is in an awkward place and so is the \, why
didn't I just get another ThinkPad mumble mumble...
 
J

Justin C

Sherm Pendley said:
Many of Perl's pods are included in the 'DevDocumentation.pkg' sub-package
of the Xcode install.

Thanks Sherm, and everyone else. I haven't got around to checking out
the Xcode stuff yet; I was assuming that, as I had perl, I'd have the
documentation if the install was OK.

There I go making assumptions again.

And I've just noticed this newsreader isn't appending my .sig. Oh the
trial of a new OS!

#!/usr/bin/perl
use warnings ;
use strict ;

open SIG "<.sig" or die ;
while (<SIG>) {
print $_ . "\n" ;
}
close SIG ;

And what's more, the # is in an awkward place and so is the \, why
didn't I just get another ThinkPad mumble mumble...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top