Catalyst/Excel.pm

filter: Statementstmt 75.6% 28 / 37 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 88.8% 8 / 9 Podpod 100% 1 / 1 totaltotal 78.7% 37 / 47 CC 2 SCAR 6.9
CC
2
Cov
76%
new
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.0
« Catalyst/Controller.pm ↑ Summary Catalyst/Form/Metadata.pm »
1 package Rose::DBx::Garden::Catalyst::Excel;
2 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use base qw( CatalystX::CRUD::YUI::Excel );
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use Data::Dump qw( dump );
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use Rose::DBx::Garden::Catalyst::TT;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use MRO::Compat;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use mro 'c3';
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 1 our $VERSION = '0.180';
12  
13 =head1 NAME
14  
15 Rose::DBx::Garden::Catalyst::Excel - View class for Excel output
16  
17 =head1 DESCRIPTION
18  
19 Rose::DBx::Garden::Catalyst::Excel is a subclass of
20 CatalystX::CRUD::YUI::Excel.
21  
22 =head1 CONFIGURATION
23  
24 Configuration is the same as with CatalystX::CRUD::View::Excel.
25 Read those docs.
26  
27 The default config here is:
28  
29 __PACKAGE__->config(
30 TEMPLATE_EXTENSION => '.tt'
31 );
32  
33 =cut
34  
35 # default config here instead of new() so subclasses can more easily override.
36 1 __PACKAGE__->config( TEMPLATE_EXTENSION => '.tt' );
37 1 $Template::Directive::WHILE_MAX = 64000;
38  
39 =head1 METHODS
40  
41 The following methods are implemented in this class:
42  
43 =cut
44  
45 =head2 new
46  
47 Overrides base new() method. Sets
48 etp_config->INCLUDE_PATH to the base
49 Rose::DBx::Garden::Catalyst::TT .tt files plus your local app root.
50 This means you can override the default .tt behaviour
51 by putting a .tt file with the same name in your C<root> template dir.
52  
53 For example, to customize your C<.xls.tt> file, just copy the default one
54 from the C<Rose/DBx/Garden/Catalyst/TT/rdgc/list.xls.tt> in @INC and put it
55 in C<root/rdgc/list.xls.tt>.
56  
57 =cut
58  
59 0 ▶sub new {
Subroutine new: not called CC=2 SCAR=17.9
Pod documented
60 0 my ( $class, $c, $arg ) = @_;
61 0 my $self = $class->next::method( $c, $arg );
62  
63 0 my @inc_path = ( Path::Class::dir( $c->config->{root} ) );
64  
65 0 for my $tt_class (
66 qw(
67 CatalystX::CRUD::YUI::TT
68 Rose::DBx::Garden::Catalyst::TT )
69 )
70 {
71  
72 0 my $template_base = Class::Inspector->loaded_filename($tt_class);
73 0 $template_base =~ s/\.pm$//;
74 0 push( @inc_path, Path::Class::dir($template_base) );
75 }
76  
77 0 $self->etp_config->{INCLUDE_PATH} = \@inc_path;
78  
79 0 return $self;
80 }
81  
82 1 1;
83  
84 __END__
85  
86 =head1 AUTHOR
87  
88 Peter Karman, C<< <karman at cpan.org> >>
89  
90 =head1 BUGS
91  
92 Please report any bugs or feature requests to
93 C<bug-rose-dbx-garden-catalyst at rt.cpan.org>, or through the web interface at
94 L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Rose-DBx-Garden-Catalyst>.
95 I will be notified, and then you'll automatically be notified of progress on
96 your bug as I make changes.
97  
98 =head1 SUPPORT
99  
100 You can find documentation for this module with the perldoc command.
101  
102 perldoc Rose::DBx::Garden::Catalyst
103  
104 You can also look for information at:
105  
106 =over 4
107  
108 =item * AnnoCPAN: Annotated CPAN documentation
109  
110 L<http://annocpan.org/dist/Rose-DBx-Garden-Catalyst>
111  
112 =item * CPAN Ratings
113  
114 L<http://cpanratings.perl.org/d/Rose-DBx-Garden-Catalyst>
115  
116 =item * RT: CPAN's request tracker
117  
118 L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Rose-DBx-Garden-Catalyst>
119  
120 =item * Search CPAN
121  
122 L<http://search.cpan.org/dist/Rose-DBx-Garden-Catalyst>
123  
124 =back
125  
126 =head1 ACKNOWLEDGEMENTS
127  
128 The Minnesota Supercomputing Institute C<< http://www.msi.umn.edu/ >>
129 sponsored the development of this software.
130  
131 =head1 COPYRIGHT & LICENSE
132  
133 Copyright 2008 by the Regents of the University of Minnesota.
134  
135 This program is free software; you can redistribute it and/or modify it
136 under the same terms as Perl itself.
137  
138  
139 =cut
« Catalyst/Controller.pm ↑ Summary Catalyst/Form/Metadata.pm »