blib/lib/OpusVL/AppKit/View/AppKitTT.pm untested

filter: Statementstmt 0.0% 0 / 11 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 16 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package OpusVL::AppKit::View::AppKitTT;
2  
3  
4 #####################################################################################################################
5 # constructing code
6 #####################################################################################################################
7  
8 use Moose;
9 BEGIN {
10 extends 'Catalyst::View::TT::Alloy';
11 }
12  
13 __PACKAGE__->config->{AUTO_FILTER} = 'html';
14 __PACKAGE__->config->{ENCODING} = 'UTF-8';
15  
16 $Template::Stash::LIST_OPS->{as_list} = sub { return ref( $_[0] ) eq 'ARRAY' ? shift : [shift]; };
17 $Template::Directive::WHILE_MAX = 100000;
18  
19 1;
20  
21 __END__
22  
23 =pod
24  
25 =encoding UTF-8
26  
27 =head1 NAME
28  
29 OpusVL::AppKit::View::AppKitTT
30  
31 =head1 VERSION
32  
33 version 2.24
34  
35 =head1 DESCRIPTION
36  
37 Standard TT View for OpusVL::AppKit.
38 Included is the 'AppKit' ShareDir path to include distributed files.
39  
40 =head1 NAME
41  
42 OpusVL::AppKit::View::AppKitTT - TT View for OpusVL::AppKit
43  
44 =head1 METHODS
45  
46 =head2 as_list
47 Little help vmethod for TemplateToolkit to force array context.
48 Helps when DBIx::Class ->search method return only 1 result.
49 eg. [% FOR row IN rs.search().as_list %]
50  
51 =head1 SEE ALSO
52  
53 L<OpusVL::AppKit>
54  
55 =head1 AUTHOR
56  
57 OpusVL - www.opusvl.com
58  
59 =head1 COPYRIGHT AND LICENSE
60  
61 This software is copyright (c) 2010 by OpusVL - www.opusvl.com.
62  
63 This is free software; you can redistribute it and/or modify it under
64 the same terms as the Perl 5 programming language system itself.
65  
66 =cut