Commit | Line | Data |
f5f03b78 |
1 | package Producer::BaseTest; |
2 | |
53ec8b7d |
3 | # |
4 | # A trivial little sub-class to test sub-classing the TT::Base producer. |
5 | # |
6 | |
f5f03b78 |
7 | use base qw/SQL::Translator::Producer::TT::Base/; |
8 | |
9 | # Make sure we use our new class as the producer |
10 | sub 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 | |
15 | sub tt_vars { ( foo => "bar" ); } |
16 | |
53ec8b7d |
17 | sub tt_config { ( INTERPOLATE => 1 ); } |
18 | |
f5f03b78 |
19 | 1; |
20 | |
21 | __DATA__ |
22 | Hello World |
b08b5416 |
23 | Tables: [% schema.get_tables.join(', ') %] |
24 | [% FOREACH table IN schema.get_tables -%] |
53ec8b7d |
25 | |
26 | $table |
27 | ------ |
28 | Fields: $table.field_names.join |
b08b5416 |
29 | [% END %] |