I need help setting up my Makefile.PL config variables. I am creating a perl module and I began with h2xs. My current variables are:

WriteMakefile( 'NAME' => 'Foo::Bar', 'VERSION_FROM' => 'Bar.pm' 'PREFIX' => '/home/deaconblues/code/lib' 'PREREQ_PM' => {}, # e.g., Module::Name => 1.1 );

I have 2 extra perl libraries I want to include when running 'make test' or 'make testdb' besides the standard perl library. When I run the testnig part of the make process the script does not find required modules in these 2 non-standard libraries. I have been editing the Make file by hand and adding -I flags to the following lines.

test_dynamic :: pure_all PERL_DL_NONLAZY=1 $(FULLPERL) -I$(INST_ARCHLIB) -I$(INST_LIB) +-I$(PERL_A RCHLIB) -I$(PERL_LIB) $(TEST_FILE) testdb_dynamic :: pure_all PERL_DL_NONLAZY=1 $(FULLPERL) $(TESTDB_SW) -I$(INST_ARCHLIB) - +I$(INST_LI B) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(TEST_FILE)

I add the flags "-I/home/deaconblues/code/lib" and "-I/opt/cd/dv/na/bin", which work. The problem with this is that whenever I 'make clean', I have to redo my edits after I rerun 'perl Makefile.PL', because the Makefile gets deleted. I would like to setup the config variables in the MakeFile.PL script to produce the changes automatically that I have been doing by hand.

I had tried using the INC variable but it doesn't get included in above lines. Please do not tell me "Well then don't 'make clean'. :-)

Thank you for your assistance


In reply to Help setting up Makefile.PL by DeaconBlues

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.