On Friday, May 17, 2002, at 07:31 , Scot Needy wrote:

> Still have a problem with this.
> In my perl code I can add to @INC one of 2 ways.
>
> use lib "/path/to/modules/SunOS/5.6"
>
> OR
>
> BEGIN {
>   use POSIX qw(uname);
>   my ($uname_s, $uname_r)  = (POSIX::uname())[0,2];
>   unshift(@INC, "/path/to/modules/$uname_s/$uname_r" );
> }
>
> If I use the BEGIN code, Perl does not search
> /path/to/modules/SunOS/5.6/sun4-solaris/auto/
> but it does find my module in /path/to/modules/SunOS/5.6

because you never told it to look there in either case.

why not simply fix your Begin to include all the
required sub directories???

cf:
http://archive.develooper.com/beginners%40perl.org/msg26168.html

Think about how many entries exist in the @INC - with something like

        my $count = 1;
        foreach my $line (@INC) {
                print "($count) $line\n";
                $count++;
        }

and you will notice tht it does not just have

        /path/to/lib5

but a standard suite of them....

ciao
drieux

---


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to