For future play / research plans to be fulfilled I wanted to get Tk-800.024 built and installed this localeveningtime. I discovered in the process of trying this that the Tk build was broken by some changes in ExtUtils::MakeMaker that resulted in Makefile data being emitted that failed.

The error I received was like this:

Unrecognized switch: --center  (-h will show valid options).
make[1]: *** [manifypods] Error 255

Several hours of feverish effort later, I had untangled the web of lies, deceits and illusions ;-) woven around this matter, and determined that the module named MM.pm under ExtUtils/Command/ was now placing a replacement command where formerly the ordinary command `pod2man' had been called. This replacement is a clear attempt to improve the portability and therefore robustness of MakeMaker builds. Oh for the happy day when Tk gets "ported" to the new Module::Build!

In order to overcome this badness for the short term, pending changes to Tk's build files which will be needed, I've created a set of patches, shown below.

Index: Tk/MMutil.pm =================================================================== RCS file: /usr/src/repositories/cvs/perl-proj/CPAN-SRC/module-packages +/Tk-800/Tk/MMutil.pm,v retrieving revision 1.1.1.1 retrieving revision 1.4 diff -u -r1.1.1.1 -r1.4 --- Tk/MMutil.pm 23 Aug 2003 02:45:52 -0000 1.1.1.1 +++ Tk/MMutil.pm 23 Aug 2003 08:54:31 -0000 1.4 @@ -330,6 +330,17 @@ my $self = shift; # Maybe always call UNIX version - we HTMLize them later local $_ = $self->MM::manifypods; + + # %somian% Do NOT use EU::Command::MM which will flake on the extra +args being + # added below, use our patched (to grok "perm_rw") stand-alone 'pod2 +man' instead: + if ($^O =~/linux/i) { + s/ + POD2MAN_EXE\s+=\s+\$\(PERLRUN\)\s+"-MExtUtils::Command::MM"\s+\-e +\s+pod2man + /POD2MAN_EXE = pod2man/x + and + s/"--"//; + } + if ($] >= 5.00565) { s/(POD2MAN_EXE.*pod2man)/$1 --center "perl\/Tk Documentation" --re +lease "Tk\$(VERSION)"/; Index: pod/Makefile.PL =================================================================== RCS file: /usr/src/repositories/cvs/perl-proj/CPAN-SRC/module-packages +/Tk-800/pod/Makefile.PL,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- pod/Makefile.PL 23 Aug 2003 02:45:53 -0000 1.1.1.1 +++ pod/Makefile.PL 23 Aug 2003 08:56:36 -0000 1.2 @@ -1,6 +1,7 @@ -use ExtUtils::MakeMaker; - -WriteMakefile( +# use ExtUtils::MakeMaker; +use Tk::MMutil; +# WriteMakefile( +Tk::MMutil::TkExtMakefile( NAME => 'Tk::pod', # DIR => [ 'pTk' ], ); --- /home/somian/src/src.ref/stableperl/pod/pod2man Thu Jul 24 00:0 +8:59 2003 +++ /opt/perl/bin/5.8.0/pod2man Sat Aug 23 03:49:54 2003 @@ -34,7 +34,7 @@ GetOptions (\%options, 'section|s=s', 'release|r=s', 'center|c=s', 'date|d=s', 'fixed=s', 'fixedbold=s', 'fixeditalic=s', 'fixedbolditalic=s', 'name|n=s', 'official|o', 'quotes|q= +s', - 'lax|l', 'help|h', 'verbose|v') or exit 1; + 'perm_rw:i', 'lax|l', 'help|h', 'verbose|v') or exit 1; pod2usage (0) if $options{help}; # Official sets --center, but don't override things explicitly set. @@ -53,12 +53,29 @@ # Initialize and run the formatter, pulling a pair of input and outpu +t off at # a time. my $parser = Pod::Man->new (%options); -my @files; -do { - @files = splice (@ARGV, 0, 2); - print " $files[1]\n" if $verbose; - $parser->parse_from_file (@files); -} while (@ARGV); +# my @files; + +# spliced in here from EU::Command::MM.pm + +do {{ # so 'next' works + my ($pod, $man) = splice(@ARGV, 0, 2); + + print "Manifying $man\n" if $verbose; + + $parser->parse_from_file($pod, $man) + or do { warn("Could not install $man\n"); next }; + + if (length $options{perm_rw}) { + chmod(oct($options{perm_rw}), $man) + or do { warn("chmod $options{perm_rw} $man: $!\n"); next }; + } +}} while @ARGV; + +# do { +# @files = splice (@ARGV, 0, 2); +# print " $files[1]\n" if $verbose; +# $parser->parse_from_file (@files); +# } while (@ARGV); __END__

PLEASE consider these patches, especially the latter patchsection which alters pod2man, to be more of a proposition and an exposition than advised. I do not want to see anyone clobber their Perl installation files with some change that could break something. Better than in-place patching would be the relocation of the new pod2man to another spot in the PATH, altering the PATH if necessary to have it be found first. Anyway, in explanation, this rude hack (it cannot be called any better) requires both things to be done and work in tandem: patching of two files in the Tk distro tree and patching of the pod2man tool which now gets called. When this is set up, the Tk build can proceed to smoothly create manpages from the POD and make will complete its work without error.

My system is Debian GNU/Linux "Woody" (3.0r1) which comes with Perl-5.6.1 installed. The ExtUtils::MakeMaker package on that system is quite old, and I had upgraded recently to MakeMaker 6.16:

M/MS/MSCHWERN/ExtUtils-MakeMaker-6.16.tar.gz

Best of luck to all the souls building Tk. Of course I know that my platform / distribution provides a pre-built Perl Tk package, and this article is not in reference to either the binary (built) or source packages being provided by the Debian package maintainer for Perl Tk.

    Soren/Intrepid

-- 
use PerlMonk::Tye qw(:wisely);

In reply to Gosh, it broke! - Tk and recent EU::MM. by Intrepid

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.