Hi PerlMonks,

I wrote some modules of which some of them are platform dependent.

This is so far my manifest of it:

bin/sysscan Changes lib/System/Scanner.pm lib/System/Scanner/AIX.pm lib/System/Scanner/Linux.pm lib/System/Scanner/Linux/RHEL.pm lib/System/Scanner/Linux/SUSE.pm Makefile.PL MANIFEST README t/System-Scanner.t

The basis of this consists of the sysscan binary plus the Scanner.pm module. The rest is platform dependant. What I need is to create at least three, maybe five different modules out of it.

This is because the next step is to make rpm packages out of it for different platforms.

I tried to figure out how to do this with ExtUtils::MakeMaker and searched for a solution, but it really fried my brain.

I learned that somehow the CONFIGURE attribute of the hash provided to WriteMakefile could be a solution, in that I could place a coderef in it that alters the hashref itself, but I after lots of google-loops and dark circles around my eyes I gave up.

I only can guess what it really does and how it works and I thought that before I jump at it doing lots of trial and error, I should take back a step and ask someone ...

Is there some way in Makefile.PL or options to accomplish this?


In reply to Makefile.PL: Howto make OS dependent modules by vicdan

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.