Installation of CPAN modules under Darwin

J

Jim Keenan

In a previous posting I described how I installed Perl 5.8.4 from
source on a new iBook G4. I now request assistance in installling
modules downloaded from CPAN on the same system.

I have previously installed my own CPAN module List::Compare on both
Windows and Linux. On both those OSs, I would simply switch to the
directory where I had unpacked the module and follow the standard
installation instructions:

perl Makefile.PL
make
make test
make install

On RedHat Linux 7.2, I had learned that in order to get the man and
info pages for any module, I had to modify the first command above as
follows:

perl makefile.PL INSTALLSITEMAN3DIR=/usr/share/man/man3

I followed the 4-command procedure above this morning, but did not get
the desired results. This is what appeared:

[List-Compare-0.3 427]$ sudo make install
Password:
Writing ///Library/Perl/5.8.1/darwin-thread-multi-2level/auto/List/Compare/.packlist
Appending installation info to
///System/Library/Perl/5.8.1/darwin-thread-multi-2level/perllocal.pod
[List-Compare-0.3 428]$ cd
[jimk 429]$ perldoc List::Compare
<standard input>:1473: warning [p 19, 0.3i]: can't break line
standard input>:1493: warning [p 19, 4.2i]: can't break line
jimk 430]$ man List::Compare
manual entry for List::Compare
jimk 431]$ info List::Compare
# info help page appeared, along with message saying
# no info page for List::Compare was located

As you can see, the first problem is that the regular procedure
installed the module relative to the Perl 5.8.1 that came with the
iBook -- but I want it installed relative to the Perl 5.8.4 that I
just installed.

The second problem is that I got nothing when calling 'perldoc
List::Compare'. This really surprised me, because while I've
sometimes had problems with the man and info calls (as suggested
above), I've always been able to call perldoc immediately after
installing a module and use that as a test for successful
installation. I have no idea what the "can't break line" warnings
mean, as I've never gotten this message on any of the many
installations and upgrades of this module which I've done.

So, to my questions:

1) What did I do wrong in the above example?

2) Is there any way I can set my system up to say: From this day
forward, consider my Perl 5.8.4 (installed under /usr/local/bin) to be
my default Perl for the purpose of installing modules, whether by the
manual procedure used above or by use of the CPAN.pm shell? (I
understand that I now have to code the shebang line as
#!/usr/local/bin/perl rather than #!/usr/bin/perl -- but that applies
only to Perl scripts.)

Thanks in advance.

Jim Keenan
 
B

Ben Morrow

Quoth (e-mail address removed) (Jim Keenan):
In a previous posting I described how I installed Perl 5.8.4 from
source on a new iBook G4. I now request assistance in installling
modules downloaded from CPAN on the same system.

I have previously installed my own CPAN module List::Compare on both
Windows and Linux. On both those OSs, I would simply switch to the
directory where I had unpacked the module and follow the standard
installation instructions:

perl Makefile.PL
make
make test
make install

On RedHat Linux 7.2, I had learned that in order to get the man and
info pages for any module, I had to modify the first command above as
follows:

perl makefile.PL INSTALLSITEMAN3DIR=/usr/share/man/man3

I followed the 4-command procedure above this morning, but did not get
the desired results. This is what appeared:

[List-Compare-0.3 427]$ sudo make install
Password:
Writing ///Library/Perl/5.8.1/darwin-thread-multi-2level/auto/List/Compare/.packlist
Appending installation info to
///System/Library/Perl/5.8.1/darwin-thread-multi-2level/perllocal.pod
[List-Compare-0.3 428]$ cd
[jimk 429]$ perldoc List::Compare
<standard input>:1473: warning [p 19, 0.3i]: can't break line
standard input>:1493: warning [p 19, 4.2i]: can't break line
jimk 430]$ man List::Compare
manual entry for List::Compare
jimk 431]$ info List::Compare
# info help page appeared, along with message saying
# no info page for List::Compare was located

As you can see, the first problem is that the regular procedure
installed the module relative to the Perl 5.8.1 that came with the
iBook -- but I want it installed relative to the Perl 5.8.4 that I
just installed.

In that case you have to say

/usr/local/bin/perl Makefile.PL
2) Is there any way I can set my system up to say: From this day
forward, consider my Perl 5.8.4 (installed under /usr/local/bin) to be
my default Perl for the purpose of installing modules, whether by the
manual procedure used above or by use of the CPAN.pm shell? (I
understand that I now have to code the shebang line as
#!/usr/local/bin/perl rather than #!/usr/bin/perl -- but that applies
only to Perl scripts.)

Probably the best soln to this is to puth /usr/local/bin first in your PATH.

Ben
 
S

Sherm Pendley

Jim said:
I followed the 4-command procedure above this morning, but did not get
the desired results. This is what appeared:

[List-Compare-0.3 427]$ sudo make install
Password:
Writing
///Library/Perl/5.8.1/darwin-thread-multi-2level/auto/List/Compare/.packlist

Check your PATH. It looks like /usr/bin appears before /usr/local/bin - if
the second is there at all.

You can verify which Perl you're running with 'perl -v'.

sherm--
 
J

Jim Keenan

Ben Morrow said:
In that case you have to say

/usr/local/bin/perl Makefile.PL


Probably the best soln to this is to puth /usr/local/bin first in your PATH.
Ben: I implemented your second suggestion first, placing
/usr/local/bin at the very front of my path in my .bash_profile --
even before $PATH. Having done that, I didn't need to implement your
first suggestion; I just called 'perl Makefile.PL'.

It worked like a charm, as evidenced by the fact that I can now view
the docs thru perldoc, man or info. I will next try this using the
CPAN shell. Thanks for your assistance.

Jim Keenan
 

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

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,045
Latest member
DRCM

Latest Threads

Top