I downloaded the latest version of TT2 from CPAN.

First, I was surprised it downloaded a developer version (2.06d).  I
thought only production versions went on CPAN?

Anyway....I found a bug on "make test".  I chose not to install the
XS Stash.

%> make test TEST_VERBOSE=1 TEST_FILES=t/tiedhash.t
PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib 
-I/usr/lib/perl5/5.6.1/i686-linux-thread-multi -I/usr/lib/perl5/5.6.1 -e 'use 
Test::Harness qw(&runtests $verbose); $verbose=1; runtests @ARGV;' t/tiedhash.t
t/tiedhash..........Couldn't load Template::Stash::XS 2.06d:

Template::Stash::XS object version 2.06 does not match bootstrap parameter 2.06d at 
/usr/lib/perl5/5.6.1/i686-linux-thread-multi/DynaLoader.pm line 225.

BEGIN failed--compilation aborted at blib/lib/Template/Stash/XS.pm line 27.
Compilation failed in require at t/tiedhash.t line 99.
BEGIN failed--compilation aborted at t/tiedhash.t line 99.
dubious
        Test returned status 2 (wstat 512, 0x200)
FAILED--1 test script could be run, alas--no output ever seen
make: *** [test_dynamic] Error 2


I think the issue is the test script (t/tiedhash.t)uses 

eval {
  require Template::Stash::XS;
};
if ($@) {
  exit(0);
}


to check for the presence of the XS stash, but on line 99 of said test
script

use Template::Stash::XS;

so we're trying to load up the XS stash at compile time, before we do the
check. 

I think this patch will correct/avoid the issue.

 
diff -Naur Template-Toolkit-2.06d/t/tiedhash.t 
Template-Toolkit-2.06d-test-patch/t/tiedhash.t
--- Template-Toolkit-2.06d/t/tiedhash.t Tue Aug 21 13:46:39 2001
+++ Template-Toolkit-2.06d-test-patch/t/tiedhash.t      Wed Jan 23 20:36:43 2002
@@ -96,7 +96,7 @@
 
 #------------------------------------------------------------------------
 use Template::Stash;
-use Template::Stash::XS;
+require Template::Stash::XS;
 
 my $stash_perl = Template::Stash->new({ hash => $hash });
 my $stash_xs   = Template::Stash::XS->new({ hash => $hash });



Reply via email to