文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>perl template 模板学习(一)

perl template 模板学习(一)

时间:2008-06-25  来源:sohu2000000

process($input, \%replace)

The process() method is called to process a template specified as the first parameter, $input. This may be a file name, file handle (e.g. GLOB or IO::Handle) or a reference to a text string containing the template text. An additional hash reference may be passed containing template variable definitions.

The method processes the template, adding any PRE_PROCESS or POST_PROCESS templates defined, and returns the output text. An uncaught exception thrown by the template will be handled by a relevant ERROR handler if defined. Errors that occur in the PRE_PROCESS or POST_PROCESS templates, or those that occur in the main input template and aren't handled, cause the method to return undef to indicate failure. The appropriate error message can be retrieved(取回, 挽回, 弥补, 恢复, 补偿, 回忆, 检索) via the error() method.

$service->process('myfile.html', { title => 'My Test File' })
|| die $service->error();

相关阅读 更多 +
排行榜 更多 +
我的世界方块启动器大全

我的世界方块启动器大全

休闲益智 下载
冠军电竞经理

冠军电竞经理

棋牌卡牌 下载
智能点读板

智能点读板

学习教育 下载