@@ -226,9 +226,25 @@ sub render_encoded {
226
226
}
227
227
228
228
sub render_into {
229
- local ($YATT , $CON ) = splice @_ , 0, 2;
230
- $YATT -> open_trans-> render_into($CON , @_ );
231
- try_invoke($CON , ' flush_headers' );
229
+ (my MY $self , my ($con , $file , $args )) = @_ ;
230
+ local ($YATT , $CON ) = ($self , $con );
231
+ if (ref $file eq ' ARRAY' ) {
232
+ # [$file, $type, $item]
233
+ $self -> open_trans-> render_into($CON , $file , $args );
234
+ } else {
235
+ $self -> raw_render_into(
236
+ $con ,
237
+ YATT::Lite::Util::rootname($file || $self -> {cf_index_name }),
238
+ $args ,
239
+ );
240
+ }
241
+ try_invoke($con , ' flush_headers' );
242
+ }
243
+
244
+ sub raw_render_into {
245
+ (local ($YATT , $CON ), my ($file , $args )) = @_ ;
246
+ my ($part , $sub , $pkg ) = $YATT -> open_trans-> find_part_renderer($file );
247
+ $sub -> ($pkg , $CON , $part -> reorder_hash_params($args ));
232
248
}
233
249
234
250
sub find_handler {
@@ -687,6 +703,11 @@ sub default_lang {
687
703
688
704
# ========================================
689
705
# Delegation to the core(Translator, which is useless for non-templating.)
706
+ #
707
+ # Note: these wrappers do not call YATT::Lite::VFS->reset_refresh_mark.
708
+ # This means once templates is compiled, it is not updated even if
709
+ # they are modified. You can avoid this behavior by
710
+ # directly using $YATT->open_trans->xxx instead.
690
711
# ========================================
691
712
foreach
692
713
(qw/ find_part
0 commit comments