The PACK001=HASH(0xa556c4) gives a hint as to why calling WriteMakefile twice doesn't work -- MakeMaker is eeeew

... All I can say. PAR Packer isn't remotely near a normal XS library. You can define macros again in postamble, but the makefile becomes unreadable to mere mortals. No core dual lifes use Module::Build as of Perl 5.12. I wont be the first.

I figured out the problem. EUMM deletes or something, I can't tell whats going on, the MY package methods after inheriting them, see cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm#l966 in perl.git. Why? I have no idea. Workaround in Makefile.pl below. My problem is resolved.
use 5.010000; use ExtUtils::MakeMaker; use Config qw(%Config); use Data::Dumper; # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. %param = ( NAME => 'MM123', VERSION_FROM => 'lib/MM123.pm', # finds $VERSION PREREQ_PM => {}, # e.g., Module::Name => 1.1 ($] >= 5.005 ? ## Add these new keywords supported since 5.005 (ABSTRACT_FROM => 'lib/MM123.pm', # retrieve abstract from modu +le AUTHOR => 'A. U. Thor <a.u.thor@a.galaxy.far.far.away>' +) : ()), # e.g., '-lm' DEFINE => '', # e.g., '-DHAVE_SOMETHING' INC => '-I.', # e.g., '-I. -I/usr/include/other' ); *MY::postamble = sub { print "postamble hook worked\n"; return ' # POSTAMBLE WORKED '; }; WriteMakefile(%param); *MY::postamble = sub { print "postamble hook worked\n"; return ' # POSTAMBLE WORKED '; }; WriteMakefile(%param);
C:\pl\mmbug>perl makefile.pl WARNING: Setting ABSTRACT via file 'lib/MM123.pm' failed at C:/perl512/lib/ExtUtils/MakeMaker.pm line 583 postamble hook worked Writing Makefile for MM123 WARNING: Setting ABSTRACT via file 'lib/MM123.pm' failed at C:/perl512/lib/ExtUtils/MakeMaker.pm line 583 postamble hook worked Writing Makefile for MM123 C:\pl\mmbug>

In reply to Re^4: 2nd run of WriteMakefile ignores MY overloads by bulk88
in thread 2nd run of WriteMakefile ignores MY overloads by bulk88

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.