Trouble using LIB.PM to modify @INC

M

Mark

Hello.

My web site recently began spitting out a stream of errors to the error log:

[Thu Jan 19 19:10:40 2006] gen_page.pm: Use of uninitialized value in hash
element at /usr/lib/perl/5.8/lib.pm line 59.
[Thu Jan 19 19:10:40 2006] jpg.pm: Use of uninitialized value in hash
element at /usr/lib/perl/5.8/lib.pm line 59.

For some reason, the LIB module is unhappy with me. It breaks on the
following line:

@INC = grep { ++$names{$_} == 1 } @INC;

I have tried several variations of the statement that passes my private
module path to the LIB module:

use lib "/home/username/sitename.com/cgi-bin";
use lib q(/home/username/sitename.com/cgi-bin);
use lib qq(/home/username/sitename.com/cgi-bin);

All result in the same error.

Any suggestions?

Thanks
-Mark
 
M

Mark

I think I have solved it. The cause looks totally unrelated,
but weirdness does tend to propogate and change form
in Perl. That's why I love it so.

-Mark
 
U

usenet

Mark said:
@INC = grep { ++$names{$_} == 1 } @INC;

FWIW, You might be interested in
perldoc -q include
"How do I add a directory to my include path (@INC) at runtime?"
 
P

Paul Lalli

FWIW, You might be interested in
perldoc -q include
"How do I add a directory to my include path (@INC) at runtime?"

Why would the OP be interested in that? The OP is already using lib.
He said that the lib module itself was giving warnings, and posting the
line from lib.pm that the warnings referred to.

What exactly are you attempting to suggest?

Paul Lalli
 
M

Mark

Paul Lalli said:
Why would the OP be interested in that? The OP is already using lib.

What this OP eventually discovered was that his input file was not in
the specified format, and this caused a whole series of weird errors
to propogate throughout the various libraries that were being used.
 

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
474,432
Messages
2,571,681
Members
48,796
Latest member
Greg L.

Latest Threads

Top