>>>>> "MM" == Mike McClain <mike.j...@cox.net> writes:
MM> On Sat, Sep 24, 2011 at 02:45:20PM -0400, Uri Guttman wrote: MM> <snip> >> >> On Sep 23, 2011 1:00 AM, "Mike McClain" <mike.j...@cox.net> wrote: >> >> > On my system @INC doesn't include /usr/share/perl/5.8.8/ >> >> > even though there are nearly 1000 files there. >> >> > Can anybody tell me where @INC is set. >> >> > >> MM> Actually, as usual, the problem turned out to be 'operator malfunction'. MM> There is /usr/share/perl/5.8/ which is a link to /usr/share/perl/5.8.8/ MM> but I didn't realize it and used File::Find without setting the 'follow' MM> flag in a routine to build a data base of perl routines and the file and MM> line where defined. >> >> you also misstated the problem. you said perl doesn't have >> /usr/share/perl/5.8.8/ in @INC. did you ever verify that with perl -V? MM> No I did it like this: MM> mike@/deb40a:~> perl -le 'print $_ for @INC;' >> if that was your main dir for holding modules and perl couldn't see it, >> nothing would be loaded. if you had said File::Find can see files in >> there but perl could, then someone would have asked about a symlink and >> pointed you to the follow option. this is a lesson to all about proper >> stating of the problem. that is half the solution to any problem. >> >> when confronted by this you first make sure perl sees the modules but >> your code doesn't. that eliminates the whole issue of @INC and how it is >> set. that was the X part of an XY problem. you thought the problem was X >> (not being in @INC) but it was Y (follow not set and a File::Find >> issue). MM> How kind of you to re-state what I had just said, I certainly MM> hope it makes you feel better and clearly a full understanding MM> of the origin of the problem led directly to its solution. That's MM> why I posted it as '[SOLVED]'. but you still asked why @INC didn't load the module. it wasn't a LOADING issue at all. you never eliminated that logic branch and so most of the effort was wasted on why @INC wasn't working. you never mentioned File::Find until much later. that is the lesson you should be learning. restating the problem is to highlight the lesson here. uri -- Uri Guttman -- uri AT perlhunter DOT com --- http://www.perlhunter.com -- ------------ Perl Developer Recruiting and Placement Services ------------- ----- Perl Code Review, Architecture, Development, Training, Support ------- -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/