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 | |
12 | sub tt_schema { local $/ = undef; return \<DATA>; } |
13 | |
14 | sub tt_vars { ( foo => "bar" ); } |
15 | |
53ec8b7d |
16 | sub tt_config { ( INTERPOLATE => 1 ); } |
17 | |
f5f03b78 |
18 | 1; |
19 | |
20 | __DATA__ |
21 | Hello World |
53ec8b7d |
22 | Tables: [% schema.get_tables %] |
23 | [% table = schema.get_tables.first -%] |
24 | |
25 | $table |
26 | ------ |
27 | Fields: $table.field_names.join |