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
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
--
If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers.
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%3F
> 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
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 Lalli wrote:
> 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%3F
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