in reply to Customizing Makefile.PL

Manpage generation is handled by manifypods() in MM_Unix.pm. This method *simply* returns string. You want to return a different text string however you probably don't want to try a manual edit. Implicit to the docs is that a method called MY::manifypods will be called instead of MM_Unix::manifypods with the same argument list as the original. As a result the easiest way to do this is:

sub MY::manifypods { # cut and paste the manifypods code from MM_Unix here # in its entirity # pod2man is being called in the ugly looking lines that start $pod2man_exe = "-S pod2man"; # <<-- edit this } push @m, qq[POD2MAN_EXE = pod2man_exe\n], qq[POD2MAN = \${PERL} -we '..... # what this horrid looking code is doing is building # up a series of command line perl scripts which then # get executed, so by changing the value of $pod2man_exe # you call pod2man with the appropriate flags which # should do the trick (I think :-) # finish with the join just like in MM_Unix.pm return join'', @m; # this returns the string }

cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

Replies are listed 'Best First'.
Re: Re: Customizing Makefile.PL
by TheHobbit (Pilgrim) on Apr 16, 2002 at 18:20 UTC

    Hi,

    using your hint, I was hable to get the following solutions, which looks better to me (it should work on other systems than Unix)

    { package MY; sub manifypods { my ($self,%attribs) = @_; my $result = $self->SUPER::manifypods(%attribs); $result =~ s/^(POD2MAN_EXE\s*=\s*)(.+)$/$1$2 -r "v. $self->{VERSIO +N}" -d "\$(REVISION_DATE)"/m; return $result; } }
    I simply call the original manifypods sub, then change the
    POD2MAN_EXE = something
    in the result.

    10q again for your reply.


    Leo TheHobbit
    GED/CS d? s-:++ a+ C++ UL+++ P+++>+++++ E+ W++ N+ o K? !w O? M V PS+++
    PE-- Y+ PPG+ t++ 5? X-- R+ tv+ b+++ DI? D G++ e*(++++) h r++ y+++(*)

      Well done. I was too lazy to cook up a regex.

      cheers

      tachyon

      s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print