I turned on debug in perl5/5.00503/sun4-solaris/DynaLoader.pm
$dl_debug = 1;

Turns out it WAS scanning /path/to/modules/SunOS/5.6
Just not /path/to/modules/SunOS/5.6/$arch/auto 

I moved /path/to/modules/SunOS/5.6/$arch/auto
to  /path/to/modules/SunOS/5.6/auto and everything now works! 

Key Debug Output. (auto/Solaris/Kstat/Kstat.so)
======================================================================
../script.pl | more 
DynaLoader.pm loaded (/local/lib/perl5/5.00503/sun4-solaris
/local/lib/perl5/5.00503 /local/lib/perl5/site_perl/5.005/sun4-solaris
/local/lib/perl5/site_perl/5.005 ., /usr/local/lib /lib /usr/lib
/usr/ccs/lib /local/Tivoli/lib/solaris2 /usr/dt/lib /usr/openwin/lib
/usr/lib /usr/ucblib /lib /usr/lib /usr/openwin/lib /usr/local/lib)
DynaLoader::bootstrap for POSIX (auto/POSIX/POSIX.so)
DynaLoader::bootstrap for Solaris::Kstat (auto/Solaris/Kstat/Kstat.so)

Check what is in @INC by printing it in your perl code.
print "\@INC is @INC\n";

@INC is /var/opt/modules/SunOS/5.6 ...etc

On Fri, 2002-05-17 at 10:50, drieux wrote:
> 
> 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]
> 



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

Reply via email to