File Coverage

lib/Template/Plugin/View.pm
Criterion Covered Total %
statement 17 17 100.0
branch n/a
condition 1 2 50.0
subroutine 5 5 100.0
pod 1 1 100.0
total 24 25 96.0


line stmt bran cond sub pod time code
1             #============================================================= -*-Perl-*-
2             #
3             # Template::Plugin::View
4             #
5             # DESCRIPTION
6             # A user-definable view based on templates. Similar to the concept of
7             # a "Skin".
8             #
9             # AUTHOR
10             # Andy Wardley
11             #
12             # COPYRIGHT
13             # Copyright (C) 2000-2007 Andy Wardley. All Rights Reserved.
14             #
15             # This module is free software; you can redistribute it and/or
16             # modify it under the same terms as Perl itself.
17             #
18             #============================================================================
19              
20             package Template::Plugin::View;
21              
22 1     1   4 use strict;
  1         1  
  1         29  
23 1     1   3 use warnings;
  1         1  
  1         32  
24 1     1   3 use base 'Template::Plugin';
  1         1  
  1         305  
25              
26             our $VERSION = 2.68;
27              
28 1     1   4 use Template::View;
  1         1  
  1         64  
29              
30             #------------------------------------------------------------------------
31             # new($context, \%config)
32             #------------------------------------------------------------------------
33              
34             sub new {
35 31     31 1 30 my $class = shift;
36 31         23 my $context = shift;
37 31   50     86 my $view = Template::View->new($context, @_)
38             || return $class->error($Template::View::ERROR);
39 31         56 $view->seal();
40 31         69 return $view;
41             }
42              
43             1;
44              
45             __END__