Commit | Line | Data |
---|---|---|
51199593 | 1 | package TestApp::FauxProvider; |
2 | ||
3 | use Template::Constants; | |
4 | ||
5 | use base qw(Template::Provider); | |
6 | ||
7 | sub fetch { | |
8 | my $self = shift(); | |
9 | my $name = shift(); | |
10 | ||
11 | my $data = { | |
12 | name => $name, | |
13 | path => $name, | |
14 | text => 'Faux-tastic!', | |
15 | 'time' => time(), | |
16 | load => time() | |
17 | }; | |
18 | ||
19 | my ($page, $error) = $self->_compile($data); | |
20 | return ($page->{'data'}, $error); | |
21 | } | |
22 | ||
23 | 1; |