From: forehead<for...@4r...> - 2004-03-25 19:21:35
|
hi, openinteract-help there is a point i confuse, in TT2Process.pm, the generate method contains: if ( $source_type eq 'NAME' ) { $template_name = $source; my ( $text, $filename, $modtime ) = OpenInteract2::ContentGenerator::TemplateSource->load_source( $template_name ); $source = \$text; } else { $template_name = '_anonymous_'; } and later use the template object call process method with $source: $template->process( $source, $template_vars, \$html ) here is the question: since we now support "x::y" like name for source name to process ( which inside the scence, TT2::Provider do fetch and load the stuff from template directories or cache which could be more effective ), why here ( in program not in template file) load it from outside ? why not just give the $source as the format 'x::y' ,just like what we do in template file inside? ---------------------- forehead (Chun Sheng) for...@4r... 2004-03-26 |