Applied patch sent in by Daniel Westermann-Clark on Oct 11 2006.
[dbsrgits/SQL-Translator.git] / t / lib / Producer / BaseTest.pm
CommitLineData
f5f03b78 1package Producer::BaseTest;
2
53ec8b7d 3#
4# A trivial little sub-class to test sub-classing the TT::Base producer.
5#
6
f5f03b78 7use base qw/SQL::Translator::Producer::TT::Base/;
8
9# Make sure we use our new class as the producer
10sub produce { return __PACKAGE__->new( translator => shift )->run; };
11
f28712a4 12# Note: we don't need to impliment tt_schema as the default will use the DATA
13# section by default.
f5f03b78 14
15sub tt_vars { ( foo => "bar" ); }
16
53ec8b7d 17sub tt_config { ( INTERPOLATE => 1 ); }
18
f5f03b78 191;
20
21__DATA__
22Hello World
b08b5416 23Tables: [% schema.get_tables.join(', ') %]
24[% FOREACH table IN schema.get_tables -%]
53ec8b7d 25
26$table
27------
28Fields: $table.field_names.join
b08b5416 29[% END %]