Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2097146
  • 博文数量: 414
  • 博客积分: 10312
  • 博客等级: 上将
  • 技术积分: 4921
  • 用 户 组: 普通用户
  • 注册时间: 2007-10-31 01:49
文章分类

全部博文(414)

文章存档

2011年(1)

2010年(29)

2009年(82)

2008年(301)

2007年(1)

分类:

2008-06-25 15:41:22

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 or templates defined, and returns the output text. An uncaught exception thrown by the template will be handled by a relevant handler if defined. Errors that occur in the or 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 method.

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


阅读(1932) | 评论(0) | 转发(0) |
0

上一篇:sort key

下一篇:LINUX中的ssize_t和size_t

给主人留下些什么吧!~~