Re: "Simple" Question

Bill Melvin (bmelvin@gbnintl.com)
Fri, 2 May 1997 16:09:08 -0400


>Looks like it can't find the submodule LWP::Protocol::http in your path.
>Have you tried
>
>        use lib "your/path/to/your/local/perl5/lib/";
>
>Your LWP::Protocol module should be somewhere here then:

Thanks for the tip. I think I'm closer now. I'm still feeling a little
dense, though.

I looked at what you mentioned and looped through %INC ($key\t$INC{$key})
to a file just before I called &getprint. The old O'Reilly book I have sez
the $key is the specified path and the value is the path found. I got from
Autoloader.pm all the way to vars.pm including:

LWP/Protocol.pm LWP/Protocol.pm

Would the $INC{$key} for the $key "LWP/Protocol.pm" be 0 if the file wasnt
found??
I think I looped through %INC correctly so Im still stumped.

The code goes like this:

>#!/usr/bin/perl
>unshift(@INC,"/path/to/lib");
>use LWP::Simple;
>
>open (F,">packages_required.txt");
>foreach $key(sort(keys(%INC))){
>print F "$key\t$INC{$key}\n";
>}
>close F;
>getprint('http://www.perl.com/');

Is there a conflict between my "unshift" and my "use LWP::Simple"??

Again, any insight is a big help.

Bill


Bill Melvin (bmelvin@gbnintl.com)
GBN Intl Inc.
1109 Delaware Ave.
Buffalo NY 14209
716-884-2655