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

NAME

Dancer2::Template::Caribou::DancerVariables - Role providing Dancer attributes to the template objects

VERSION

version 1.0.0

SYNOPSIS

    package Dancer2::View::MyView;

    use Moose;
    use Template::Caribou;

    with qw/ 
        Template::Caribou 
        Dancer2::Template::Caribou::DancerVariables 
    /;

    template page => sub {
        my $self = shift;
        
        print ::RAW $self->uri_for( '/foo' );
    };

DESCRIPTION

Dancer2::Template::Caribou::DancerVariables adds attributes and methods to allow interactions with the Dancer2 application and its context.

METHODS

request()

Returns the current Dancer2::Core::Request object.

uri_for( $path )

Returns the absolute url for the given $path.

AUTHOR

Yanick Champoux <yanick@babyl.dyndns.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2013 by Yanick Champoux.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.