True, but as this extract from Dynaloader.pm shows, it looks in site/lib/auto/module first:
foreach (@INC) {
chop($_ = VMS::Filespec::unixpath($_)) if $Is_VMS;
my $dir;
if ($Is_MacOS) {
my $path = $_;
if ($Mac_FS && ! -d $path) {
$path = Mac::FileSpec::Unixish::nativize($path);
}
$path .= ":" unless /:$/;
$dir = "${path}auto:$modpname";
} else {
$dir = "$_/auto/$modpname";
}
next unless -d $dir; # skip over uninteresting directories
# check for common cases to avoid autoload of dl_findfile
my $try = $Is_MacOS ? "$dir:$modfname.$dl_dlext" : "$dir/$modfname
+.$dl_dlext";
last if $file = ($do_expand) ? dl_expandspec($try) : ((-f $try) &&
+ $try);
# no luck here, save dir for possible later dl_findfile search
push @dirs, $dir;
}
After that, it basically goes off on a mind-blowingly slow and complicated tour of every directory in @INC and a few other places. The question is: why? What does this 'flexibily' buy anyone? It's just more complexity for no gain.
The danger of omitting the your is that Simple.dll from the XS version of XML::Simple overwrites Simple.dll from the XS version of CGI::Simple. Omitting the auto compounds the problem.
Define a rule, document it and stick to it. And then, when the dll isn't found the module can report site/lib/auto/your/module.dll not found. Currently, they cannot do that because they would have to say:
Couldn't find Module.dll in site/lib/auto/your, or site/lib/auto or si
+te/lib or site/lib/some/other/module/You/Used or site/lib/some/Other/
+Random/Place/WeT/hought/To/Try/ ...
Sigh! If only we could go back in time.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
|