%define upstream_name Text-Handlebars %define upstream_version 0.01 Name: perl-%{upstream_name} Version: %perl_convert_version %{upstream_version} Release: %mkrel 2 Summary: Http://handlebarsjs.com/ for Text::Xslate License: GPL+ or Artistic Group: Development/Perl Url: http://search.cpan.org/dist/%{upstream_name} Source0: http://www.cpan.org/modules/by-module/Text/%{upstream_name}-%{upstream_version}.tar.gz BuildRequires: perl(Any::Moose) BuildRequires: perl(Carp) BuildRequires: perl(File::Find) BuildRequires: perl(File::Temp) BuildRequires: perl(Scalar::Util) BuildRequires: perl(Sub::Exporter) BuildRequires: perl(Test::Builder) BuildRequires: perl(Test::Fatal) BuildRequires: perl(Test::More) BuildRequires: perl(Test::Requires) BuildRequires: perl(Text::Xslate) BuildRequires: perl(Text::Xslate::Compiler) BuildRequires: perl(Text::Xslate::Parser) BuildRequires: perl(Text::Xslate::Symbol) BuildRequires: perl(Text::Xslate::Util) BuildRequires: perl(Try::Tiny) BuildRequires: perl(base) BuildRequires: perl(constant) BuildRequires: perl(strict) BuildRequires: perl(warnings) BuildArch: noarch %description This module subclasses the Text::Xslate manpage to provide a parser for http://handlebarsjs.com/ templates. In most ways, this module functions identically to Text::Xslate, except that it parses Handlebars templates instead. Text::Handlebars accepts an additional constructor parameter of 'helpers' to define Handlebars-style helper functions. Standard helpers are identical to functions defined with the 'function' parameter, except that they receive the current context implicitly as the first parameter (since perl doesn't have an implicit 'this' parameter). Block helpers also receive the context as the first parameter, and they also receive the 'options' parameter as a hashref. As an example: sub { my ($context, $items, $options) = @_; %prep %setup -q -n %{upstream_name}-%{upstream_version} %build %{__perl} Makefile.PL INSTALLDIRS=vendor %make %check %make test %install %makeinstall_std %files %doc README Changes LICENSE META.yml META.json %{_mandir}/man3/* %perl_vendorlib/* %changelog * Sun Jan 13 2013 umeabot <umeabot> 0.10.0-2.mga3 + Revision: 374096 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Tue Oct 09 2012 jquelin <jquelin> 0.10.0-1.mga3 + Revision: 303898 - imported package perl-Text-Handlebars