Text-Xslate
view release on metacpan or search on metacpan
t/030_kolon/011_macro.t
t/030_kolon/012_cascade.t
t/030_kolon/013_more_field.t
t/030_kolon/014_while.t
t/030_kolon/015_methods.t
t/030_kolon/016_funcs.t
t/030_kolon/017_more_macro.t
t/030_kolon/018_dynamic_filters.t
t/030_kolon/019_explicit_interpolate.t
t/030_kolon/020_chomp.t
t/030_kolon/021_overlay.t
t/030_kolon/022_given.t
t/030_kolon/023_bitwise.t
t/030_kolon/024_localize_vars.t
t/030_kolon/025_objectliteral.t
t/030_kolon/026_constant.t
t/030_kolon/027_lambda.t
t/030_kolon/028_smartmatch.t
t/030_kolon/029_blockfilter.t
t/030_kolon/030_xfuncs.t
t/030_kolon/031_post_if.t
Thanks to lestrrat for the suggestion to the interface of `render()`,
the contribution of Text::Xslate::Runner (was App::Xslate), and a lot of
suggestions.
Thanks to tokuhirom for the ideas, feature requests, encouragement, and bug finding.
Thanks to gardejo for the proposal to the name **template cascading**.
Thanks to makamaka for the contribution of Text::Xslate::PP.
Thanks to jjn1056 to the concept of template overlay (now implemented as `cascade with ...`).
Thanks to typester for the various inspirations.
Thanks to clouder for the patch of adding `AND` and `OR` to TTerse.
Thanks to punytan for the documentation improvement.
Thanks to chiba for the bug reports and patches.
Thanks to turugina for the patch to fix Win32 problems
lib/Text/Xslate.pm view on Meta::CPAN
Thanks to lestrrat for the suggestion to the interface of C<render()>,
the contribution of Text::Xslate::Runner (was App::Xslate), and a lot of
suggestions.
Thanks to tokuhirom for the ideas, feature requests, encouragement, and bug finding.
Thanks to gardejo for the proposal to the name B<template cascading>.
Thanks to makamaka for the contribution of Text::Xslate::PP.
Thanks to jjn1056 to the concept of template overlay (now implemented as C<cascade with ...>).
Thanks to typester for the various inspirations.
Thanks to clouder for the patch of adding C<AND> and C<OR> to TTerse.
Thanks to punytan for the documentation improvement.
Thanks to chiba for the bug reports and patches.
Thanks to turugina for the patch to fix Win32 problems
lib/Text/Xslate/Compiler.pm view on Meta::CPAN
my @components = $cascade->second
? (map{ $self->_bare_to_file($_) } @{$cascade->second})
: ();
my $vars = $cascade->third;
if(defined $base) { # pure cascade
$base_file = $self->_bare_to_file($base);
$base_code = $engine->load_file($base_file);
$self->requires( $engine->find_file($base_file)->{fullpath} );
}
else { # overlay
$base_file = $args->{file}; # only for error messages
$base_code = $main_code;
if(defined $args->{fullpath}) {
$self->requires( $args->{fullpath} );
}
push @{$main_code}, $self->_flush_macro_table();
}
lib/Text/Xslate/Compiler.pm view on Meta::CPAN
}
foreach my $c(@{$main_code}) {
if($c->[_OP_NAME] eq 'print_raw_s'
&& $c->[_OP_ARG] =~ m{ [^ \t\r\n] }xms) {
Carp::carp("Xslate: Useless use of text '$c->[1]'");
}
}
@{$main_code} = @{$base_code};
}
else { # overlay
return;
}
}
sub _process_cascade_file {
my($self, $file, $base_code) = @_;
printf STDERR "# cascade file %s\n", p($file) if _DUMP_CAS;
my $mtable = $self->macro_table;
for(my $i = 0; $i < @{$base_code}; $i++) {
t/030_kolon/021_overlay.t view on Meta::CPAN
[<<'T', { lang => 'Xslate' }, <<'X', 'with components'],
: cascade myapp::base with myapp::cfoo, myapp::cbar
T
HEAD
FOO
Hello, Xslate world!
BAR
FOOT
X
[<<'T', { lang => 'Xslate' }, <<'X', 'overlay'],
: cascade with myapp::cfoo, myapp::cbar
----
: block hello -> {
This is template cascading!
: }
----
T
----
FOO
This is template cascading!
( run in 1.018 second using v1.01-cache-2.11-cpan-49f99fa48dc )