CPAN reports not matching what's installed

C

chriswaltham

I'm very new to Perl, 'm having trouble on an OS X Serve (10.4.6) with
perl (5.6.1). In a nutshell, my problem that the 'r' command in the
CPAN shell is giving me only a partial output of what's installed on a
machine. And, yes, I know 5.6.1 is an old version of perl, but I do
have the latest Bundle::CPAN

cpan> r

Package namespace installed latest in CPAN file

(output snipped)

Text::Tabs 98.112801 2005.0824
MUIR/modules/Text-Tabs+Wrap-2005.0824.tar.gz
XSLoader 0.01 0.06
SAPER/XSLoader-0.06.tar.gz

(more snipped)

In this case, note that Time::Local (the module I'm trying to
troubleshoot) is not listed by CPAN as being installed. Yet when I try
to install it:

cpan> install Time::Local
Time::Local is up to date (1.12).

Is there a way to force the 'r' command to somehow re-generate it's
reports? I'm trying to port an application (that I didn't write) from
Solaris to OS X, which is why I'm trying to match perl versions and
thus using perl 5.6.1. On the Solaris box, 'r' in CPAN tells me
Time::Local is installed, whereas on the OS X box it is not listed.

I'm trying to troubleshoot Time::Local because I get this error message
when making a perl/MySQL call: "Software error: Can't use an undefined
value as a symbol reference at (eval 10) line 11." Line 11 of the code
in question reads: "my $timestamps = localtime();"

Thanks!


Chris
 
A

Anno Siegel

I'm very new to Perl, 'm having trouble on an OS X Serve (10.4.6) with
perl (5.6.1). In a nutshell, my problem that the 'r' command in the
CPAN shell is giving me only a partial output of what's installed on a
machine. And, yes, I know 5.6.1 is an old version of perl, but I do
have the latest Bundle::CPAN

cpan> r

Package namespace installed latest in CPAN file

(output snipped)

Text::Tabs 98.112801 2005.0824
MUIR/modules/Text-Tabs+Wrap-2005.0824.tar.gz
XSLoader 0.01 0.06
SAPER/XSLoader-0.06.tar.gz

(more snipped)

The "r" command is described as giving *reinstall recommendations*. What
makes you think it ought to list all installed modules?
In this case, note that Time::Local (the module I'm trying to
troubleshoot) is not listed by CPAN as being installed. Yet when I try
to install it:

cpan> install Time::Local
Time::Local is up to date (1.12).

Quite so. Your installed version is up to date, so "r" doesn't list it.
It does exactly what it is described to do.

Anno
 
P

Paul Lalli

I'm very new to Perl, 'm having trouble on an OS X Serve (10.4.6) with
perl (5.6.1). In a nutshell, my problem that the 'r' command in the
CPAN shell is giving me only a partial output of what's installed on a
machine.

As Anno pointed out, that's not how you find out what modules are
installed on your system. CPAN's 'r' command does not do that.

Perl 5.8 contains a FAQ as to the proper method of doing that. Since
you're running 5.6.1, you can instead read the FAQ online:

http://perldoc.perl.org/perlfaq3.html#How-do-I-find-which-modules-are-installed-on-my-system?
I'm trying to troubleshoot Time::Local because I get this error message
when making a perl/MySQL call: "Software error: Can't use an undefined
value as a symbol reference at (eval 10) line 11."

Forgive me, but that's rather arrogant of you. The chances of there
being a problem with a standard module as opposed to your own code are
pretty slim.
Line 11 of the code
in question reads: "my $timestamps = localtime();"

I could be wrong, but I'm pretty sure that the error message is telling
you that the error is on line 11 of the 10th eval() in the file, not on
line 11 of the file itself.

Paul Lalli
 
C

chriswaltham

Anno said:
The "r" command is described as giving *reinstall recommendations*. What
makes you think it ought to list all installed modules?

My mistake, I interpreted it as "list modules that are installed and
thus CPAN knows about updating", as opposed to "list modules that are
installed but version numbers are unknown or not current."

Paul said:
Perl 5.8 contains a FAQ as to the proper method of doing that. Since
you're running 5.6.1, you can instead read the FAQ online:

http://perldoc.perl.org/perlfaq3.html#How-do-I-find-which-modules-are-installed-on-my-system?

I'll look that up, thanks.
Forgive me, but that's rather arrogant of you. The chances of there
being a problem with a standard module as opposed to your own code are
pretty slim.

I guess I wasn't clear enough in my original post. I haven't written
any of this code (either the application I'm trying to debug or,
obviously, the Time::Local module itself); I am merely trying to debug
it after porting from one OS to the other. My first instinct was that
there's a difference in the way that Solaris and OS X report
localtime(), hence I was trying to make sure that the Time::Local
module was behaving the same way on both platforms. But because it
wasn't listed in CPAN by the 'r' command (which was, of course, my
mistake) I was concerned for a version incompatibility first; I never
meant to imply that Time::Local itself is buggy.
I could be wrong, but I'm pretty sure that the error message is telling
you that the error is on line 11 of the 10th eval() in the file, not on
line 11 of the file itself.

Okay, thanks -- I'll check that out, too.


Chris
 

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,780
Messages
2,569,611
Members
45,264
Latest member
FletcherDa

Latest Threads

Top