Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Hello folks!

Despite many years programming in Perl I'm at my second real module. I'm used to module-starter that uses ExtUtils::MakeMaker as default builder.

My laziness got suddenly annoyed to maintain a Readme file manually: I brutally copy my pod output to this file, but I must remember to do it anytime I modify the doc.

I supposed to automate this and I asked here and there. I was pointed to Overriding-MakeMaker-Methods where is stated:

> Here is a simple example of how to add a new target to the generated Makefile:

The only working (for my purpose) modification to my Makefile.PL is the following

sub MY::postamble { return <<'MAKE_README'; postamble :: $(PERLRUN) -MPod::Text \ -e "Pod::Text->new (sentence => 1, width => 78)->parse_from_file( +qw( $(TO_INST_PM) Readme) );" MAKE_README }

Which modify the end of resulting Makefile generated by perl Makefile.PL from:

# --- MakeMaker postamble section: # End.

to this:

# --- MakeMaker postamble section: postamble :: $(PERLRUN) -MPod::Text \ -e "Pod::Text->new (sentence => 1, width => 78)->parse_from_file( +qw( $(TO_INST_PM) Readme) );" # End.

Then I can succesfully run dmake postamble (yes strawberry perl has dmake) to have my Readme updated.

Questions

MY::postamble is a fixed name? Both the class MY and the postamble name are fixed? I tried different names and it always complains: dmake:  Error: -- Don't know how to make `customname' Cannot the creation of the Readme integrated inside make dist or other similar steps?

Or should I treat Makefile.PL as a normal perl program putting my custom do_readme sub call before WriteMakefile one?

It's only me or the docs are sybilline and stingy of words?

PS I have chatted a bit on #perl channel about this and the discussion diverged on authoring tools (where ExtUtils::MakeMaker is not an authoring tool). mbtiny was suggested and also Distar with some interesting read: A-BRIEF-HISTORY-OF-AUTHORING and a COMPARISON

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

In reply to let Makefile.PL to do the Readme file for me -- new target? by Discipulus

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (3)
As of 2024-04-19 01:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found