From 0070253cab90a0ed1f661662d3a838b41bf182ae Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Fri, 19 Jul 2013 16:05:34 -0400 Subject: docs --- lib/Catalyst/View/Spreadsheet/Template.pm | 106 ++++++++++++++++++++++++++++-- 1 file changed, 102 insertions(+), 4 deletions(-) diff --git a/lib/Catalyst/View/Spreadsheet/Template.pm b/lib/Catalyst/View/Spreadsheet/Template.pm index 229264a..e770461 100644 --- a/lib/Catalyst/View/Spreadsheet/Template.pm +++ b/lib/Catalyst/View/Spreadsheet/Template.pm @@ -1,6 +1,7 @@ package Catalyst::View::Spreadsheet::Template; use Moose; use namespace::autoclean; +# ABSTRACT: render Spreadsheet::Template templates in Catalyst use Path::Class::File; use Try::Tiny; @@ -9,10 +10,24 @@ use Spreadsheet::Template; extends 'Catalyst::View'; -has renderer => ( - is => 'rw', - isa => 'Spreadsheet::Template', -); +=head1 SYNOPSIS + + package MyApp::View::Spreadsheet::Template; + use Moose; + + extends 'Catalyst::View::Spreadsheet::Template'; + +=head1 DESCRIPTION + +This module provides a L for L. + +=cut + +=attr path + +Template search path. Defaults to C<< [ $c->path_to('root') ] >>. + +=cut has path => ( traits => ['Array'], @@ -24,30 +39,60 @@ has path => ( }, ); +=attr processor_class + +The C to pass through to the L object. + +=cut + has processor_class => ( is => 'ro', isa => 'Str', default => 'Spreadsheet::Template::Processor::Xslate', ); +=attr writer_class + +The C to pass through to the L object. + +=cut + has writer_class => ( is => 'ro', isa => 'Str', default => 'Spreadsheet::Template::Writer::XLSX', ); +=attr template_extension + +The extension to use for template files. Defaults to C. + +=cut + has template_extension => ( is => 'ro', isa => 'Str', default => 'json', ); +=attr catalyst_var + +The variable name to use for the Catalyst context object in the template. +Defaults to C. + +=cut + has catalyst_var => ( is => 'ro', isa => 'Str', default => 'c', ); +has renderer => ( + is => 'rw', + isa => 'Spreadsheet::Template', +); + sub ACCEPT_CONTEXT { my $self = shift; my ($c) = @_; @@ -128,4 +173,57 @@ sub _extension { __PACKAGE__->meta->make_immutable; no Moose; +=head1 BUGS + +No known bugs. + +Please report any bugs to GitHub Issues at +L. + +=head1 SEE ALSO + +L + +L + +=head1 SUPPORT + +You can find this documentation for this module with the perldoc command. + + perldoc Catalyst::View::Spreadsheet::Template + +You can also look for information at: + +=over 4 + +=item * MetaCPAN + +L + +=item * RT: CPAN's request tracker + +L + +=item * Github + +L + +=item * CPAN Ratings + +L + +=back + +=head1 SPONSORS + +Parts of this code were paid for by + +=over 4 + +=item Socialflow L + +=back + +=cut + 1; -- cgit v1.2.3-54-g00ecf