Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/garu/catalyst-view-haml
Haml view for Catalyst apps
https://github.com/garu/catalyst-view-haml
Last synced: 11 days ago
JSON representation
Haml view for Catalyst apps
- Host: GitHub
- URL: https://github.com/garu/catalyst-view-haml
- Owner: garu
- Created: 2013-04-28T07:02:06.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-04-28T08:20:31.000Z (over 11 years ago)
- Last Synced: 2024-11-05T21:50:32.912Z (about 2 months ago)
- Language: Perl
- Size: 141 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: Changes
Awesome Lists containing this project
README
Catalyst::View::Haml - Haml View Class for Catalyst
===================================================SYNOPSIS
--------New to Haml? Check out [http://haml-lang.com/tutorial.html](http://haml-lang.com/tutorial.html).
This module lets you create a Haml view for your Catalyst application:
package MyApp::View::Web;
use Moose;
extends 'Catalyst::View::Haml';
# ...your custom code here...
1;
or use the helper to create it for you:
myapp_create.pl view Web Haml
then you can write your templates in Haml!
#content
.left.column
%h2 Welcome to our site!
%p= $information
.right.column
= $item->{body}If you want to omit sigils in your Haml templates, just set the 'vars\_as\_subs'
option:package MyApp::View::Web;
use Moose;
extends 'Catalyst::View::Haml';has '+vars_as_subs', default => 1;
1;
this way the Haml template above becomes:
#content
.left.column
%h2 Welcome to our site!
%p= information
.right.column
= item->{body}INSTALLATION
------------cpan Catalyst::View::Haml
Or, manually, after downloading and unpacking:
perl Makefile.PL
make
make test
make installSUPPORT AND DOCUMENTATION
-------------------------After installing, you can find documentation for this module with the
perldoc command.perldoc Catalyst::View::Haml
You can also look for information at:
RT, CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Catalyst-View-HamlAUTHOR
------Breno G. de Oliveira, ``
ACKNOWLEDGEMENTS
----------------Viacheslav Tykhanovskyi (vti) for his awesome [Text::Haml](http://search.cpan.org/perldoc?Text::Haml) implementation of
[Haml](http://haml-lang.com), the entire Haml and Catalyst teams of devs,
and Daisuke Maki (lesterrat) for Catalyst::View::Xslate, from which lots of
this code was borrowed (sometimes nearly verbatim).LICENSE AND COPYRIGHT
---------------------Copyright 2010-2013 Breno G. de Oliveira.
This program is free software; you can redistribute it and/or modify it
under the terms of either: the GNU General Public License as published
by the Free Software Foundation; or the Artistic License.See http://dev.perl.org/licenses/ for more information.