Don't take this the wrong way, but you seem to be *very* confused about
how modules get installed and how to write Perl modules. Part of this
confusion is probably stemming from the fact that you're starting off
trying to write a module that involves XS. XS always complicates matters.
I'd suggest you write a simple pure Perl module first to familiarize
yourself with MakeMaker and module installation. *Don't* use h2xs. It
makes things more complicated than they need to be. Read the
ExtUtils::MakeMaker::Tutorial and write the Makefile.PL by hand.
On Fri, Oct 31, 2003 at 02:50:00AM -0800, Soumyadeep nandi wrote:
> I still haven't get around the problem of
> installation.
>
> My module in my machine resides in
> /usr/lib/perl5/site_perl/5.8.0/Bio/Tools/Local/Plantgenome.pm
> and as I run
> h2xs -n Bio::Tools::Local::Plantgenome
> I get the a directory Bio and the module
> Plantgenome.pm
> as i get into the Bio directory which has the
> architecture as Bio/Tools/Local/Plantgenome I get the
> folowing files and directory
>
> Changes fallback Makefile.PL MANIFEST
> Plantgenome.pm Plantgenome.xs ppport.h README t
>
> Then I made the changes in the Makefile.PL
> as you suggested me in your last mail.
>
> Now my Makefile.PL looks like
> use 5.008;
> use ExtUtils::MakeMaker;
> # See lib/ExtUtils/MakeMaker.pm for details of how to
> influence
> # the contents of the Makefile that is written.
> WriteMakefile(
> 'INSTALLDIRS' => 'perl',
I don't know who told you to set this, but get rid of it. Setting
INSTALLDIRS to 'perl' is for core Perl modules only. You should be using
the default 'site'. This puts it into site_perl.
> 'LIB' =>
> '/usr/lib/perl5/site_perl/5.8.0/Bio/Tools',
What's that all about? Get rid of that. LIB is only if you want to force
the module to go into a specific place. The MakeMaker defaults will handle
it for you and put the module where you want it. With the above you're
screwing up the install process. It'll wind up in something like have
/usr/lib/perl5/site_perl/5.8.0/Bio/Tools/Bio/Tools/Local/Plantgenome.pm
> Still it is installing the module in
> "/usr/lib/perl5/site_perl/5.8.0/Bio/Tools/i386-linux-thread-multi/auto/"
This is because of that mangled LIB setting you had. Get rid of the LIB
setting and it should work fine.
> and I want it to be installed in
> "/usr/lib/perl5/site_perl/5.8.0/Bio/Tools/"
> where a new directory will be created Local having
> Plantgenome module.
Understand this very carefully. Your module is called
Bio::Tools::Local::Plantgenome. Its represented by the file
Bio/Tools/Local/Plantgenome.pm. The library directory you want to
install this into is /usr/lib/perl5/site_perl/5.8.0/. Put them
together and you get
/usr/lib/perl5/site_perl/5.8.0/Bio/Tools/Local/Plantgenome.pm.
Saying you want to install it into /usr/lib/perl5/site_perl/5.8.0/Bio/Tools/
tells me you don't quite understand how perl module names map to files.
/usr/lib/perl5/site_perl/5.8.0/ is the library directory. Your module
is Bio/Tools/Local/Plantgenome.pm. You don't think of Bio/Tools/
and Local/Plantgenome.pm as being seperate.
However, its not going to go into /usr/lib/perl5/site_perl/5.8.0. Its
going to go into /usr/lib/perl5/site_perl/5.8.0/i368-linux/ because that's
where modules that involve XS go. Don't try to fight this, its the way
its supposed to work. You will be able to use your module just fine
by saying:
use Bio::Tools::Local::Plantgenome;
> Would you please suggest a solution for this problem.
I've been trying to and its getting frustrating.
--
Michael G Schwern [EMAIL PROTECTED] http://www.pobox.com/~schwern/
Me? A robot? That's rediculous! For one thing, that doesn't compute at all!