[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl-AnyPerl] Re: Perl Starmapping



Date: Fri, 6 Aug 99 13:27:41 -0700
Message-Id: <199908062026.NAA05151@pacific.telebyte.com>
x-sender: brianmc@pacific.telebyte.com
x-mailer: Claris Emailer 1.1
>From vlb@cfcl.com  Fri Aug  6 13:26:34 1999

For answers, macperl-anyperl@macperl.org  seems like as good a place as
any to start.

Below is Richard Grubb on a Unix box.  We're working on some code to
parse star catalogs into 3D coordinates.  I threw in Math::Trig to do
degree-to-radian conversion, and now it's broken on his box:

>I downloaded Math::Trig and tried to install it. The readme file said
>type
> "perl Makefile.pl".  There was no Makefile.pl, but here was a
>Makefile.PL. When I used that name, I get:
>
>syntax error in file Makefile.PL at line 1, next 2 tokens "use ExtUtils"
>syntax error in file Makefile.PL at line 6, next 2 tokens
>"WriteMakefile("
>
>But I have /opt/perl5/lib/ExtUtils/MakeMaker.pm and /opt/perl5/lib/ is
>the second pathname in @INC. Line one in Makefile.PL is:
>
>use ExtUtils::MakeMaker;
>
>What is wrong?

'fraid I can't really help with this.  Not only do I not have a Unix
workstation handy (all my experience in in Macintosh Perl), but most Mac
installs bypass the Makefile.PL (and yes, case is important) completely.
Cris Nandor's cpan-mac uses MakeMaker internally, so I know that the
functionality is there (in fact, it's in MM_MacOS.pm, which contains Mac
overides to the Unix defaults (it's part of the standard distribution, so
if you HAVE the standard distro, you've got it, even on Unix)).  Chris
has done a really good job hiding the internals of the install process
with cpan-mac.  I can log on to CPAN, type "install Module_Name" and the
download and install process proceeds from there.  Of course cpan-mac is
a HUGE memory hog (needs 40Megs to do it's work in), but thanks to Chris,
we Mac users have got it EASY these days. The CPAN client even checks to
see if I've got the latest version, and works out all the
interdependencies as well.  I'm sure there's a similarly featured CPAN
client in Unix, that would be a REAL help with the dependencies,
version-checking and such.

What I *suspect* is that you have both perl4 and perl5 on your system,
and *don't* have the complete distibution for perl5.  I don't recommend
yelling at the sysadmin, but there's really no good reason *I* can think
of for having both.  There are *some* incompatibilities between versions,
and perhaps some legacy code would need to be tweaked a bit to run
correctly under perl5, but this doesn't excuse the half-hearted install
of the latter.

At an rate, check both the version of Perl and MakeMaker, as there may be
a mismatch there (but I'm really just grasping at straws.  You need a
REAL Perl guru to answer your question).

Real Perl guru?  What's your take.

In response to my call for an algorithm for determining the nearest
neighbors to a chosen star, Richard says:

> This looks like a normal tree type structure in C with a Tree Traversal
> algorithm. I'm not sure how to impliment a tree in Perl (need pointers I
> think). Maybe the book I buy today will show me how. But I'd like to
> tackle this part.

Okay, it's yours!  Somewhere, I should have formulas for calculating the
distance between any two stars, given the cartesian coordinates for each,
which may or may not be helpful.  Not sure how to do tree traversal in
Perl.  I'll dig into my own Perl books, but probably not till later
today. Have fun.

# Fungal Parataxonomy                   Mycology Information (Mycoinfo)
# Webmaster, Staff Writer      **The World's First Mycology E-Journal**
# <mailto:webmaster@mycoinfo.com>            <http://www.mycoinfo.com/>
#
# First they ignore you. Then they laugh at you. Then they fight you.
# Then you win.                                     --Mohandas Gandhi

==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-anyperl-request@macperl.org