Hi! On Monday 27 July 2009 23:05:48 Jean-Christian Hassler wrote: > Hi, > > I created a CPAN distribution with module-starter and I have developped a > perl module creating my *.pm file in the lib/ directory and it uses a > template file that is also in the lib/ directory. It works when I do the > tests with "prove -l t/*.t". > > The matter is when I use "./Build test", the *.pm file is copied in the > blib directory and not the template file, so the test fail. > > So my 2 questions are : > - What's the philosophical difference between the lib/ and the blib/ dir ?
lib/ holds the source .pm (and .xs, etc. files). blib/ holds the compiled ones. If you have some .xs files, then they will be compiled into .so's and bootstrapping files from into blib. There may also be some aspect of preprocessing some code there. > - Where should I put my template file in order to be sure my module will be > able to always find it ? > You should use some Module::Build magic to install it. I have some of it in my XML-Grammar modules, but I'm not sure it works correctly: http://search.cpan.org/~shlomif/ Better ask on the M-B mailing list. Regards, Shlomi Fish > Thanks for your answer > > Jean-Christian HASSLER -- ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ Why I Love Perl - http://xrl.us/bjn88 God gave us two eyes and ten fingers so we will type five times as much as we read.
