Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CPAN reports not matching what's installed

2 views
Skip to first unread message

chrisw...@gmail.com

unread,
Apr 18, 2006, 3:51:35 PM4/18/06
to
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

Anno Siegel

unread,
Apr 19, 2006, 7:17:49 AM4/19/06
to
<chrisw...@gmail.com> wrote in comp.lang.perl.misc:

> 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
--
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.

Paul Lalli

unread,
Apr 19, 2006, 7:52:33 AM4/19/06
to
chrisw...@gmail.com wrote:
> 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%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

chrisw...@gmail.com

unread,
Apr 19, 2006, 8:56:07 AM4/19/06
to
Anno Siegel wrote:
> 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 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

0 new messages