DBI::Test - what does "templating" mean

Jens Rehsack <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase.devel
Message-ID <[email protected]>
Hi everyone,

sorry for late summary.

I noticed last Wednesday that there is a lot of confusion what I mean when asking for how do we templating in DBI::Test.

Beside all sides belonging to that question, I only meant the composition of the resulting .t file.
For explaining examples I use a templating syntax loosely based on TT2.

In my implementation, the *.t files look:

#![% PERL_BIN %]
[% INIT.join(„\n“) %]
use DBI::Mock;
use DBI::Test::DSN::Provider;

use [% TEST_CASE %];

my \$test_case_conf = DBI::Test::DSN::Provider->get_dsn_creds("% TEST_CASE %]", [% DSN %]);
% TEST_CASE %]->run_test(\$test_case_conf);
[% CLEANUP.join(„\n“) %]

The tumbler example currently uses (more or less)

#![% PERL_BIN %]
[% PRE %]
[% IF TESTINFO.REQUIRE.defined(); %] require [% TESTINFO.REQUIRE; END %]
[% TESTINFO.CODE %]
[% POST %]

For tumbler it’s fine to ignore separations of concern (test case management must not be part), but the sample needs it for showing some output.

Before doing next steps (integrating tumbler), test case management and templating should be discussed.

Cheers
-- 
Jens Rehsack
[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.