Rose::DBx::Garden::Catalyst::Excel - View class for Excel output


Rose-DBx-Garden-Catalyst documentation Contained in the Rose-DBx-Garden-Catalyst distribution.

Index


Code Index:

NAME

Top

Rose::DBx::Garden::Catalyst::Excel - View class for Excel output

DESCRIPTION

Top

Rose::DBx::Garden::Catalyst::Excel is a subclass of CatalystX::CRUD::YUI::Excel.

CONFIGURATION

Top

Configuration is the same as with CatalystX::CRUD::View::Excel. Read those docs.

The default config here is:

 __PACKAGE__->config(
    TEMPLATE_EXTENSION => '.tt'
 );

METHODS

Top

The following methods are implemented in this class:

new

Overrides base new() method. Sets etp_config->INCLUDE_PATH to the base Rose::DBx::Garden::Catalyst::TT .tt files plus your local app root. This means you can override the default .tt behaviour by putting a .tt file with the same name in your root template dir.

For example, to customize your .xls.tt file, just copy the default one from the Rose/DBx/Garden/Catalyst/TT/rdgc/list.xls.tt in @INC and put it in root/rdgc/list.xls.tt.

AUTHOR

Top

Peter Karman, <karman at cpan.org>

BUGS

Top

Please report any bugs or feature requests to bug-rose-dbx-garden-catalyst at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Rose-DBx-Garden-Catalyst. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

Top

You can find documentation for this module with the perldoc command.

    perldoc Rose::DBx::Garden::Catalyst

You can also look for information at:

* AnnoCPAN: Annotated CPAN documentation

http://annocpan.org/dist/Rose-DBx-Garden-Catalyst

* CPAN Ratings

http://cpanratings.perl.org/d/Rose-DBx-Garden-Catalyst

* RT: CPAN's request tracker

http://rt.cpan.org/NoAuth/Bugs.html?Dist=Rose-DBx-Garden-Catalyst

* Search CPAN

http://search.cpan.org/dist/Rose-DBx-Garden-Catalyst

ACKNOWLEDGEMENTS

Top

The Minnesota Supercomputing Institute http://www.msi.umn.edu/ sponsored the development of this software.

COPYRIGHT & LICENSE

Top


Rose-DBx-Garden-Catalyst documentation Contained in the Rose-DBx-Garden-Catalyst distribution.
package Rose::DBx::Garden::Catalyst::Excel;
use strict;
use warnings;
use base qw( CatalystX::CRUD::YUI::Excel );
use Carp;
use Data::Dump qw( dump );
use Rose::DBx::Garden::Catalyst::TT;
use MRO::Compat;
use mro 'c3';

our $VERSION = '0.15';

# default config here instead of new() so subclasses can more easily override.
__PACKAGE__->config( TEMPLATE_EXTENSION => '.tt' );
$Template::Directive::WHILE_MAX = 64000;

sub new {
    my ( $class, $c, $arg ) = @_;
    my $self = $class->next::method( $c, $arg );

    my @inc_path = ( Path::Class::dir( $c->config->{root} ) );

    for my $tt_class (
        qw(
        CatalystX::CRUD::YUI::TT
        Rose::DBx::Garden::Catalyst::TT )
        )
    {

        my $template_base = Class::Inspector->loaded_filename($tt_class);
        $template_base =~ s/\.pm$//;
        push( @inc_path, Path::Class::dir($template_base) );
    }

    $self->etp_config->{INCLUDE_PATH} = \@inc_path;

    return $self;
}

1;

__END__