This is because perl searches for modules like so - splits on the :: of the given package name, where everything up to the last element is a directory and the last element is the name of the file with a .pm automatically appeneded and then this path is search for in the one of the @INC directories (left-to-right) until found. In code it might look like thisc:\perl\site\lib\WWW\Search\PubMed.pm
You can find further details in perlmod.use File::Spec::Functions; sub use { my($pkg, @args) = @_; my(@dirs, $file) = split '::', $pkg; my $path = catfile @dirs, "$file.pm"; eval q< BEGIN { my($lib) = grep { -f cafile($_, $path) } @INC; my $code = IO::File->new(catfile $lib,$path) or die "ack - $!"; $INC{$path} = catfile $lib, $path; eval $code->getlines; $file->import(@args); } >; }
_________
broquaint
In reply to Re: problems with search module backend
by broquaint
in thread problems with search module backend
by dannoura
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |