-
-
02 Apr 2017 17:56:28 UTC
- Distribution: Template-Caribou
- Module version: v1.2.1
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues (3)
- Testers (400 / 1 / 55)
- Kwalitee
Bus factor: 1- 86.00% Coverage
- License: perl_5
- Perl: v5.20.0
- Activity
24 month- Tools
- Download (37.1KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- Carp
- Class::Load
- Exporter::Tiny
- List::AllUtils
- Module::Runtime
- Moose::Exporter
- Moose::Role
- Moose::Util
- MooseX::Role::Parameterized
- Path::Tiny
- Ref::Util
- Text::MultiMarkdown
- Tie::Handle
- Try::Tiny
- XML::Writer
- experimental
- overload
- parent
- strict
- warnings
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Template::Caribou - class-based HTML-centric templating system
VERSION
version 1.2.1
SYNOPSIS
package MyTemplate; use Template::Caribou; use Template::Caribou::Tags::HTML qw/ :all /; has name => ( is => 'ro' ); template page => sub { my $self = shift; html { head { title { 'Example' } }; $self->my_body; } }; template my_body => sub { my $self = shift; body { h1 { 'howdie ' . $self->name } } }; package main; my $template = MyTemplate->new( name => 'Yanick' ); print $template->page;
DESCRIPTION
WARNING: Codebase is alpha with extreme prejudice. Assume that bugs are teeming and that the API is subject to change.
Template::Caribou is a Moose-based, class-centric templating system mostly aimed at producing sgml-like outputs, mostly HTML, but also XML, SVG, etc. It is heavily inspired by Template::Declare.
For a manual on how to use
Template::Caribou
, have a peek at Template::Caribou::Manual.When
use
d within a namespace,Template::Caribou
will apply the role Template::Caribou::Role to it (and auto-turn the namespace into Moose class if it wasn't a Moose class or role already), as well as import the keywordstemplate
andattr
(the latter from Template::Caribou::Tags), as well as load Template::Caribou::Utils.AUTHOR
Yanick Champoux <yanick@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2017 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.
Module Install Instructions
To install Template::Caribou, copy and paste the appropriate command in to your terminal.
cpanm Template::Caribou
perl -MCPAN -e shell install Template::Caribou
For more information on module installation, please visit the detailed CPAN module installation guide.