Hi, As a novice to perl programming I am stuck to a problem for which I seek your help. I have written a module in perl, and I want to make it installable module. As such, I ran the following commands: h2xs -n Local::Plantgenome perl Makefile.PL make dist I want this module to be installed in a particular location (/usr/lib/perl5/site_perl/5.8.0/Bio/Tools/), on the other systems. Thus I have tried, while running perl Makefile.PL LIB=/usr/lib/perl5/site_perl/5.8.0/Bio/Tools
But the module is being installed in "/usr/lib/perl5/site_perl/5.8.0/Bio/Tools/i386-linux-thread-multi/auto/Lo cal/"
Remember that when you tell Perl to load module Foo::Bar, for each directory present in @INC, Perl will search in the appropriate subdirectories for the file Foo/Bar.pm. In other words, the module name determines where Perl will look for it, and there fore where it must be installed; a module named Local::Plantgenome must have a file "Plantgenome.pm" in a subdirectory "Local" under one of the places Perl will search based on @INC. MakeMaker's trying to do this for you.
If your goal was to have Plantgenome.pm live in the .../Bio/Tools directory, the module must be named Bio::Tools::Plantgenome.pm. If your intent was to use .../Bio/Tools as a type of site-specific library location (i.e. you would pass /usr/lib/perl5/site_perl_5.8.0/Bio/Tools to perl via the L<lib> pragma or the PERL5LIB evironment variable), then it's correct to set LIB when calling MakeMaker, and let it do the right thing. (I wouldn't generally recommend the latter approach over just putting the file in your site_lib, unless you need to shield other programs from this module.)
I hope this helps.
-- Pax, Charlie
