Subject: | ttree.cfg is not generated |
Template::Toolkit's Makefile.PL generates wrong Makefile parts.
For TT 2.20 it seems, Docs and Examples shouldn't be generated
automatically at installation - the relating sub invocations are
commented out ;-)
But there're a few remaining typo's ($x = 'n'; print( 'Ok' ) if( $x ); #
prints 'Ok')
Subject: | Template-Toolkit-2.20-patch-Makefile.PL |
--- Makefile.PL.orig 2008-08-08 12:41:15.000000000 +0200
+++ Makefile.PL 2008-09-08 20:10:02.401028000 +0200
@@ -186,12 +186,12 @@
@$(PERL) -I$(INST_LIB) -I$(INST_ARCHLIB) bin/gifsplash -v -i "$(TT_PREFIX)"
EOF
- $amble .=<<EOF if $main::TT_BUILD_DOCS;
+ $amble .=<<EOF if( $main::TT_BUILD_DOCS && ( $main::TT_BUILD_DOCS =~ /^y/i ) );
tt2_html_docs ::
\@\$(PERL) -I\$(INST_LIB) -I\$(INST_ARCHLIB) bin/ttree -v -f "\$(TT_PREFIX)/$TT_DOCS_CFG"
EOF
- $amble .=<<EOF if $main::TT_EXAMPLES;
+ $amble .=<<EOF if( $main::TT_EXAMPLES && ( $main::TT_EXAMPLES =~ m/^y/i ) );
tt2_examples ::
\@\$(PERL) -I\$(INST_LIB) -I\$(INST_ARCHLIB) bin/ttree -v -f "\$(TT_PREFIX)/$TT_EXAMPLE_CFG"
@@ -203,8 +203,8 @@
my $class = shift;
my $basic = $class->SUPER::install(@_);
my $add = 'tt2_install tt2_splash';
- $add .= ' tt2_html_docs' if $main::TT_BUILD_DOCS;
- $add .= ' tt2_examples' if $main::TT_EXAMPLES;
+ $add .= ' tt2_html_docs' if( $main::TT_BUILD_DOCS && ( $main::TT_BUILD_DOCS =~ /^y/i ) );
+ $add .= ' tt2_examples' if( $main::TT_EXAMPLES && ( $main::TT_EXAMPLES =~ m/^y/i ) );
$basic =~ s/^(install\s+::\s+.*)$/$1 $add/m
if $main::TT_PREFIX;
$basic;
@@ -762,7 +762,7 @@
open(FP, "> $DEFAULTS_FILE") || die "$DEFAULTS_FILE: $!\n";
my ( $ttdocs, $ttsplash, $ttexamples,
$ttextras, $ttxs_enable, $ttxs_default )
- = map { $_ ? 'y' : 'n' }
+ = map { ( $_ && ( $_ =~ /^y/i ) ) ? 'y' : 'n' }
( $TT_BUILD_DOCS, $TT_SPLASH_DOCS, $TT_EXAMPLES,
$TT_EXTRAS, $TT_XS_ENABLE, $TT_XS_DEFAULT );
print FP <<EOF;