File: FauxProvider.pm

package info (click to toggle)
libcatalyst-view-tt-perl 0.34-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 324 kB
  • ctags: 164
  • sloc: perl: 2,324; makefile: 4
file content (23 lines) | stat: -rw-r--r-- 414 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package TestApp::FauxProvider;

use Template::Constants;

use base qw(Template::Provider);

sub fetch {
    my $self = shift();
    my $name = shift();
    
    my $data = {
        name    => $name,
        path    => $name,
        text    => 'Faux-tastic!',
        'time'  => time(),
        load    => time()
    };

    my ($page, $error) = $self->_compile($data);
    return ($page->{'data'}, $error);
}

1;