in reply to Finding loadable objects (script refuses to fail)

I'd hazard a guess that XSLoader.pm is smart enough to figure out that the POSIX.so file is in the auto/POSIX directory below the directory where POSIX.pm is found. Wit this snippet of code from XSLoader.pm:
my @modparts = split(/::/,$module); my $modfname = $modparts[-1]; my $modpname = join('/',@modparts); my $modlibname = (caller())[1]; my $c = @modparts; $modlibname =~ s,[\\/][^\\/]+$,, while $c--; # Q&D basename my $file = "$modlibname/auto/$modpname/$modfname.$dl_dlext";
Later on it does a dl_load_file of $file, which for POSIX.pl will contain <directory containing POSIX.pm>/auto/POSIX/POSIX.so. So, if your script can find POSIX.pm, it can find POSIX.so.

This is just a naieve browsing of XSLoader and POSIX.pm code, however, so I might be wrong. You will find some salt in the monastery's kitchen :).

CU
Robartes-

Replies are listed 'Best First'.
Re: Re: Finding loadable objects (script refuses to fail)
by hawtin (Prior) on Mar 12, 2003 at 14:38 UTC

    That was sort of what I was thinking should happen, but I changed the name of POSIX.so near the POSIX.pm file to POSIX.so.b to try and emulate the remote site's situation. But the script still did not fail here. Somehow it manages to load POSIX.so from somewhere whatever I do.

    I am working on Solaris so naturally I can't unmount all the disks or pull the network cable (or even do a find from /).

    I know that Perl is powerfull but this is starting to make me seriously question my sanity. Where does it find it?