Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sub render_file {
- my ( $self, $file, $path, $vars ) = @_;
- $vars ||= {};
- my $t = Template->new;
- my $template = $self->get_sharedir_file( 'root', $file );
- return 0 unless $template;
- my $output;
- $t->process( \$template, { %{$self}, %$vars }, \$output )
- || Catalyst::Exception->throw(
- message => qq/Couldn't process "$file", / . $t->error() );
- $self->mk_file( $path, $output );
- }
Add Comment
Please, Sign In to add comment