The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

Name

Template::Declare::Catalyst - Template::Declare subclass for Catalyst

Synopsis

   use parent 'Template::Declare::Catalyst';
   use Template::Declare::Tags;

    template hello => sub {
        my ($self, $vars) = @_;
        html {
            head { title { "Hello, $vars->{user}" } };
            body { h1    { "Hello, $vars->{user}" } };
        };
    };

Description

This subclass of Template::Declare adds extra functionality for use in Catalyst with Catalyst::View::TD.

Interface

Class Methods

context

  my $c = Template::Declare::Catalyst->context;

Returns the Catalyst context object, if available.

c

  my $c = Template::Declare::Catalyst->c;

An alias for context.

SEE ALSO

Catalyst::View::TD, Catalyst::Helper::View::TD, Catalyst::Helper::TDClass.

Author

David E. Wheeler <david@justatheory.com>

License

This library is free software. You can redistribute it and/or modify it under the same terms as perl itself.