...
 
Commits (28)
Revision history for perl module Text::Hogan
1.07 2018-12-21
* Variable $key and $Key typo (thanks Yanick Champoux!)
1.06 2018-09-30
* Update SEE ALSO section in POD (thanks Mohammad S Anwar :-))
1.05 2018-09-29
* Bug fixes for as_string (thanks Tony Finch for catching 3 different bugs!)
1.04 2016-11-02
* Prefer array over arrayref (thanks Tom Hukins!)
* Add copyright_holder to dist.ini (thanks Tom Hukins!)
......
This software is copyright (c) 2016 by Alex Balhatchet.
This software is copyright (c) 2018 by Alex Balhatchet.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
......@@ -12,7 +12,7 @@ b) the "Artistic License"
--- The GNU General Public License, Version 1, February 1989 ---
This software is Copyright (c) 2016 by Alex Balhatchet.
This software is Copyright (c) 2018 by Alex Balhatchet.
This is free software, licensed under:
......@@ -272,7 +272,7 @@ That's all there is to it!
--- The Artistic License 1.0 ---
This software is Copyright (c) 2016 by Alex Balhatchet.
This software is Copyright (c) 2018 by Alex Balhatchet.
This is free software, licensed under:
......
......@@ -56,7 +56,7 @@
"web" : "http://github.com/kaoru/Text-Hogan"
}
},
"version" : "1.04",
"version" : "1.07",
"x_serialization_backend" : "Cpanel::JSON::XS version 3.0214"
}
......@@ -27,5 +27,5 @@ requires:
resources:
bugtracker: https://github.com/kaoru/Text-Hogan/issues
repository: git://github.com/kaoru/Text-Hogan
version: '1.04'
version: '1.07'
x_serialization_backend: 'YAML::Tiny version 1.69'
......@@ -28,7 +28,7 @@ my %WriteMakefileArgs = (
"Try::Tiny" => "0.22",
"YAML" => "1.13"
},
"VERSION" => "1.04",
"VERSION" => "1.07",
"test" => {
"TESTS" => "t/*.t"
}
......
This archive contains the distribution Text-Hogan,
version 1.04:
version 1.07:
Text::Hogan - A mustache templating engine statement-for-statement cloned from hogan.js
This software is copyright (c) 2016 by Alex Balhatchet.
This software is copyright (c) 2018 by Alex Balhatchet.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
......
CDBS+git-buildpackage
---------------------
This source package uses CDBS and git-buildpackage. NMUs need not (but
are encouraged to) make special use of these tools. In particular, the
debian/control.in file can be completely ignored.
More info here: http://wiki.debian.org/CDBS+git-buildpackage
-- Jonas Smedegaard <dr@jones.dk> Mon, 18 Feb 2013 12:55:37 +0100
libtext-hogan-perl (1.04-3) UNRELEASED; urgency=medium
libtext-hogan-perl (1.07-1) unstable; urgency=medium
* debian/*: update GitHub URLs to use HTTPS.
[ upstream ]
* New release(s).
-- gregor herrmann <gregoa@debian.org> Sat, 09 Jun 2018 21:15:31 +0200
[ gregor herrmann ]
* Update GitHub URLs to use HTTPS.
[ Jonas Smedegaard ]
* Simplify rules. Stop build-depend on cdbs.
* Stop build-depend on dh-buildinfo.
* Mark build-dependencies needed only for testsuite as such.
* Declare compliance with Debian Policy 4.3.0.
* Enable autopkgtest.
* Set Rules-Requires-Root: no.
* Update watch file: Rewrite usage comment.
* Wrap and sort control file.
* Update copyright info:
+ Extend coverage of packaging.
+ Bump (yes not extend) coverage for main upstream author.
-- Jonas Smedegaard <dr@jones.dk> Thu, 21 Feb 2019 16:30:47 +0100
libtext-hogan-perl (1.04-2) unstable; urgency=medium
......
Source: libtext-hogan-perl
Maintainer: Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>
Uploaders: Jonas Smedegaard <dr@jones.dk>
Uploaders:
Jonas Smedegaard <dr@jones.dk>,
Section: perl
Priority: optional
Build-Depends: cdbs,
perl,
Build-Depends:
debhelper,
dh-buildinfo,
libclone-perl,
libtext-trim-perl,
perl (>= 5.21.4) | libscalar-list-utils-perl,
libdata-visitor-perl,
libtry-tiny-perl,
libyaml-perl,
libpath-tiny-perl (>= 0.59),
perl (>= 5.21.5) | libtest-simple-perl (>= 1.001008)
Standards-Version: 4.1.4
libclone-perl <!nocheck>,
libdata-visitor-perl <!nocheck>,
libpath-tiny-perl (>= 0.59) <!nocheck>,
libtext-trim-perl <!nocheck>,
libtry-tiny-perl <!nocheck>,
libyaml-perl <!nocheck>,
perl,
perl (>= 5.21.4) | libscalar-list-utils-perl <!nocheck>,
perl (>= 5.21.5) | libtest-simple-perl (>= 1.001008) <!nocheck>,
Standards-Version: 4.3.0
Vcs-Git: https://salsa.debian.org/perl-team/modules/packages/libtext-hogan-perl.git
Vcs-Browser: https://salsa.debian.org/perl-team/modules/packages/libtext-hogan-perl
Homepage: https://metacpan.org/release/Text-Hogan
Testsuite: autopkgtest-pkg-perl
Rules-Requires-Root: no
Package: libtext-hogan-perl
Architecture: all
Depends: ${perl:Depends}, ${misc:Depends}, ${cdbs:Depends}
Recommends: ${cdbs:Recommends}
Suggests: ${cdbs:Suggests}
Depends:
libclone-perl,
libtext-trim-perl,
perl (>= 5.21.4) | libscalar-list-utils-perl,
${misc:Depends},
${perl:Depends},
Description: mustache templating engine statement-for-statement cloned from hogan.js
Text::Hogan is a statement-for-statement rewrite of hogan.js in Perl.
.
It is a mustache templating engine which supports pre-compilation of
your templates into pure Perl code, which then renders very quickly.
It is a mustache templating engine
which supports pre-compilation of your templates into pure Perl code,
which then renders very quickly.
.
It passes the full mustache spec.
Source: libtext-hogan-perl
Maintainer: Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>
Uploaders: Jonas Smedegaard <dr@jones.dk>
Section: perl
Priority: optional
Build-Depends: @cdbs@
Standards-Version: 4.1.4
Vcs-Git: https://salsa.debian.org/perl-team/modules/packages/libtext-hogan-perl.git
Vcs-Browser: https://salsa.debian.org/perl-team/modules/packages/libtext-hogan-perl
Homepage: https://metacpan.org/release/Text-Hogan
Package: libtext-hogan-perl
Architecture: all
Depends: ${perl:Depends}, ${misc:Depends}, ${cdbs:Depends}
Recommends: ${cdbs:Recommends}
Suggests: ${cdbs:Suggests}
Description: mustache templating engine statement-for-statement cloned from hogan.js
Text::Hogan is a statement-for-statement rewrite of hogan.js in Perl.
.
It is a mustache templating engine which supports pre-compilation of
your templates into pure Perl code, which then renders very quickly.
.
It passes the full mustache spec.
......@@ -5,22 +5,24 @@ Source: https://github.com/kaoru/Text-Hogan
https://github.com/kaoru/Text-Hogan
Files: *
Copyright: 2016, Alex Balhatchet <alex@balhatchet.net>
Copyright: 2018, Alex Balhatchet <alex@balhatchet.net>
License-Grant:
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
This is free software;
you can redistribute it and/or modify it
under the same terms as the Perl 5 programming language system itself.
License: Artistic or GPL-1+
Comment:
Perl 5 is licensed under either the 'Artistic license' or the 'GNU
General Public License' version 1 or later.
Perl 5 is licensed under either the Artistic license
or the GNU General Public License version 1 or later.
Files: debian/*
Copyright: 2016, Jonas Smedegaard <dr@jones.dk>
Copyright: 2016,2018-2019, Jonas Smedegaard <dr@jones.dk>
License-Grant:
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation, either version 3 of the License, or (at your
option) any later version.
This program is free software;
you can redistribute it and/or modify it
under the terms of the GNU General Public License
as published by the Free Software Foundation,
either version 3 of the License, or (at your option) any later version.
License: GPL-3+
License: Artistic
......
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: FIXME
Upstream-Contact: FIXME
Source: FIXME
......@@ -10,11 +10,10 @@ Files: Changes
META.yml
Makefile.PL
README.pod
debian/README.source
debian/compat
debian/control
debian/control.in
debian/gbp.conf
debian/rules
debian/source/format
debian/watch
dist.ini
......@@ -39,15 +38,8 @@ Copyright: NONE
License: UNKNOWN
FIXME
Files: debian/copyright-check
debian/rules
Copyright: 2016, Jonas Smedegaard <dr@jones.dk>
2016-2017, Jonas Smedegaard <dr@jones.dk>
License: GPL-3+
FIXME
Files: README
Copyright: 2016, Alex Balhatchet.
Copyright: 2018, Alex Balhatchet.
License: Artistic or GPL-1+
FIXME
......@@ -55,7 +47,7 @@ Files: LICENSE
Copyright: 1989, Free Software Foundation, Inc.
19xx name of author
19yy <name of author>
2016, Alex Balhatchet.
2018, Alex Balhatchet.
disclaimer" for the program, if
ed by the Free
interest in the
......@@ -64,6 +56,11 @@ Copyright: 1989, Free Software Foundation, Inc.
License: Artistic or GPL-1+
FIXME
Files: debian/copyright-check
Copyright: 2016-2017, Jonas Smedegaard <dr@jones.dk>
License: GPL-3+
FIXME
Files: debian/source/lintian-overrides
Copyright: Artistic
GPL-1+
......
#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-
# Copyright 2016, Jonas Smedegaard <dr@jones.dk>
# Description: Main Debian packaging script for Text::Hogan
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
include /usr/share/cdbs/1/class/perl-makemaker.mk
include /usr/share/cdbs/1/rules/debhelper.mk
pkg = $(DEB_SOURCE_PACKAGE)
# Needed by upstream build and (always) at runtime
deps +=, libclone-perl, libtext-trim-perl
deps +=, perl (>= 5.21.4) | libscalar-list-utils-perl
# Needed by upstream testsuite
deps-test = libdata-visitor-perl, libtry-tiny-perl, libyaml-perl
deps-test +=, libpath-tiny-perl (>= 0.59)
deps-test +=, perl (>= 5.21.5) | libtest-simple-perl (>= 1.001008)
CDBS_BUILD_DEPENDS +=, $(deps), $(deps-test)
CDBS_DEPENDS_$(pkg) = $(deps)
%:
dh $@
# run "uscan --report" to check or "gpb import-orig --uscan" to update
version=4
# check: uscan --report
# update: gbp import-orig --upstream-vcs-tag=vX.Y.Z --uscan
https://metacpan.org/release/Text-Hogan \
.*/Text-Hogan@ANY_VERSION@@ARCHIVE_EXT@
.*/Text-Hogan@ANY_VERSION@@ARCHIVE_EXT@
name = Text-Hogan
version = 1.04
version = 1.07
abstract = Text::Hogan - A mustache templating engine statement-for-statement cloned from hogan.js
author = Alex Balhatchet
......
package Text::Hogan;
$Text::Hogan::VERSION = '1.04';
$Text::Hogan::VERSION = '1.07';
use strict;
use warnings;
......@@ -13,7 +13,7 @@ Text::Hogan - A mustache templating engine statement-for-statement cloned from h
=head1 VERSION
version 1.04
version 1.07
=head1 DESCRIPTION
......@@ -55,18 +55,22 @@ on Node.js and pre-compiles templates to pure JavaScript.
=head2 Text::Caml
L<Text::Caml|Text::Caml> is a very good mustache-like templating engine, but
does not support pre-compilation.
L<Text::Caml|Text::Caml> supports searching for partials by file name, by
default .caml but that can be configured.
=head2 Template::Mustache
L<Template::Mustache|Template::Mustache> is a module written by Pieter van de
Bruggen. Currently has no POD. Used by Dancer::Template::Mustache.
L<Template::Mustache|Template::Mustache> is used by Dancer::Template::Mustache
and Dancer2::Template::Mustache. It supports compile once, render many times,
but does not allow dumping the compiled form to disk.
=head2 Mustache::Simple
I don't know anything about L<Mustache::Simple|Mustache::Simple>. It seems to
be available on search.cpan.org but not on metacpan.org which is a bad sign.
L<Mustache::Simple|Mustache::Simple> largely supports the Mustache spec, but
skips the whitespace and decimal tests (its behaviour with decimals is the same
as Text::Hogan with 'numeric_string_as_string' option enabled.) It supports
passing objects with getters to the context hash, so that {{name}} can be
rendered from $object->name if $object->can('name') returns true.
=head1 AUTHOR
......
package Text::Hogan::Compiler;
$Text::Hogan::Compiler::VERSION = '1.04';
$Text::Hogan::Compiler::VERSION = '1.07';
use Text::Hogan::Template;
use strict;
......@@ -304,11 +304,11 @@ sub stringify_substitutions {
}
sub stringify_partials {
my $code_obj;
my $code_obj = shift;
my @partials;
for my $key (sort keys %{ $code_obj->{'partials'} }) {
push @partials, sprintf('"%s" => { "name" => "%s", %s }',
push @partials, sprintf('"%s" => { "name" => "%s", %s }', $key,
esc($code_obj->{'partials'}{$key}{'name'}),
stringify_partials($code_obj->{'partials'}{$key})
);
......@@ -322,7 +322,7 @@ sub stringify_partials {
sub stringify {
my ($self,$code_obj, $text, $options) = @_;
return sprintf('{ code => sub { my ($self,$c,$p,$i) = @_; %s }, %s }',
return sprintf('{ code => sub { my ($t,$c,$p,$i) = @_; %s }, %s }',
wrap_main($code_obj->{'code'}),
stringify_partials($code_obj)
);
......@@ -559,7 +559,7 @@ Text::Hogan::Compiler - parse templates and output Perl code
=head1 VERSION
version 1.04
version 1.07
=head1 SYNOPSIS
......
package Text::Hogan::Template;
$Text::Hogan::Template::VERSION = '1.04';
$Text::Hogan::Template::VERSION = '1.07';
use strict;
use warnings;
......@@ -353,8 +353,6 @@ sub find_in_scope {
sub create_specialized_partial {
my ($instance, $subs, $partials, $stack_subs, $stack_partials, $stack_text) = @_;
my $key;
my $Partial = clone($instance);
$Partial->{'buf'} = "";
......@@ -367,7 +365,7 @@ sub create_specialized_partial {
$stack_subs->{$key} = $subs->{$key};
}
}
for my $Key (sort keys %$stack_subs) {
for my $key (sort keys %$stack_subs) {
$Partial->{'subs'}{$key} = $stack_subs->{$key};
}
......@@ -402,7 +400,7 @@ Text::Hogan::Template - represent and render compiled templates
=head1 VERSION
version 1.04
version 1.07
=head1 SYNOPSIS
......