Dancer-Template-Xslate
view release on metacpan or search on metacpan
MANIFEST
META.json
META.yml
README
dist.ini
lib/Dancer/Template/Xslate.pm
perlcritic.rc
t/00-compile.t
t/01-main.t
t/02-app.t
t/03-cascade.t
t/author-critic.t
t/author-distmeta.t
t/author-eol.t
t/author-minimum-version.t
t/author-mojibake.t
t/author-no-tabs.t
t/author-pod-coverage.t
t/author-pod-linkcheck.t
t/author-pod-spell.t
t/author-pod-syntax.t
t/author-portability.t
t/author-synopsis.t
t/author-test-version.t
t/lib/TestApp.pm
t/release-cpan-changes.t
t/release-dist-manifest.t
t/release-kwalitee.t
t/release-meta-json.t
t/release-unused-vars.t
t/views/cascade.tx
t/views/cascade_base.tx
t/views/index.tx
t/views/index.xslate
cache_dir: .xslate_cache/
cache: 1
extension: tx # Dancer's default template extension is "tt"
module:
- Text::Xslate::Bridge::TT2Like # to keep partial compatibility with Template Toolkit
CAVEATS
Cascading
Dancer already provides a <cascade>-like feature, called a "layout",
in order to augment other template engines lacking such a feature. In
order to use Xslate's cascade, turn off layout by commenting out or
removing the appropriate line in your Dancer application config.
Smart HTML Escaping
Use of Dancer's layout feature will cause HTML templates to be
HTML-entity encoded twice if Xslate's "smart HTML escaping" feature
is enabled. Xslate's type option can be set to "text" to disable
smart-escaping, or, once again, layout can be disabled in favor of
cascade.
SEE ALSO
Dancer
Text::Xslate
MAINTAINER
Dancer Core Team
lib/Dancer/Template/Xslate.pm view on Meta::CPAN
extension: tx # Dancer's default template extension is "tt"
module:
- Text::Xslate::Bridge::TT2Like # to keep partial compatibility with Template Toolkit
=head1 CAVEATS
=over
=item Cascading
Dancer already provides a <cascade>-like feature, called a "layout", in order
to augment other template engines lacking such a feature. In order to use
Xslate's C<cascade>, turn off C<layout> by commenting out or removing the
appropriate line in your Dancer application config.
=item Smart HTML Escaping
Use of Dancer's C<layout> feature will cause HTML templates to be HTML-entity
encoded twice if Xslate's "smart HTML escaping" feature is enabled. Xslate's
C<type> option can be set to "text" to disable smart-escaping, or, once again,
C<layout> can be disabled in favor of C<cascade>.
=back
=head1 SEE ALSO
=over
=item L<Dancer>
=item L<Text::Xslate>
t/03-cascade.t view on Meta::CPAN
use Dancer::Template::Xslate;
my $engine = Dancer::Template::Xslate->new(
config =>
{
extension => "tx",
path => [catdir(qw(t views))],
},
);
my $template = "cascade.tx";
my $result = $engine->render($template);
my $expected = "header\nbody\nfooter\n";
is $result, $expected, "cascade and extension test";
$engine = Dancer::Template::Xslate->new(
config =>
{
suffix => ".tx",
path => [catdir(qw(t views))],
},
);
$result = $engine->render($template);
is $result, $expected, "cascade and extension test";
t/author-eol.t view on Meta::CPAN
# this test was generated with Dist::Zilla::Plugin::Test::EOL 0.19
use Test::More 0.88;
use Test::EOL;
my @files = (
'lib/Dancer/Template/Xslate.pm',
't/00-compile.t',
't/01-main.t',
't/02-app.t',
't/03-cascade.t',
't/author-critic.t',
't/author-distmeta.t',
't/author-eol.t',
't/author-minimum-version.t',
't/author-mojibake.t',
't/author-no-tabs.t',
't/author-pod-coverage.t',
't/author-pod-linkcheck.t',
't/author-pod-spell.t',
't/author-pod-syntax.t',
't/author-portability.t',
't/author-synopsis.t',
't/author-test-version.t',
't/lib/TestApp.pm',
't/release-cpan-changes.t',
't/release-dist-manifest.t',
't/release-kwalitee.t',
't/release-meta-json.t',
't/release-unused-vars.t',
't/views/cascade.tx',
't/views/cascade_base.tx',
't/views/index.tx',
't/views/index.xslate'
);
eol_unix_ok($_, { trailing_whitespace => 1 }) foreach @files;
done_testing;
t/author-no-tabs.t view on Meta::CPAN
# this test was generated with Dist::Zilla::Plugin::Test::NoTabs 0.15
use Test::More 0.88;
use Test::NoTabs;
my @files = (
'lib/Dancer/Template/Xslate.pm',
't/00-compile.t',
't/01-main.t',
't/02-app.t',
't/03-cascade.t',
't/author-critic.t',
't/author-distmeta.t',
't/author-eol.t',
't/author-minimum-version.t',
't/author-mojibake.t',
't/author-no-tabs.t',
't/author-pod-coverage.t',
't/author-pod-linkcheck.t',
't/author-pod-spell.t',
't/author-pod-syntax.t',
't/author-portability.t',
't/author-synopsis.t',
't/author-test-version.t',
't/lib/TestApp.pm',
't/release-cpan-changes.t',
't/release-dist-manifest.t',
't/release-kwalitee.t',
't/release-meta-json.t',
't/release-unused-vars.t',
't/views/cascade.tx',
't/views/cascade_base.tx',
't/views/index.tx',
't/views/index.xslate'
);
notabs_ok($_) foreach @files;
done_testing;
t/views/cascade.tx view on Meta::CPAN
: cascade cascade_base
: around body -> {
body
: }
( run in 0.576 second using v1.01-cache-2.11-cpan-49f99fa48dc )