Tripletail::Filter - CGI出力加工
$TL->setContentFilter('Tripletail::Filter::HTML', charset => 'UTF-8'); $TL->print("foo\n");
$TL->print 、 $template->flush で出力されるデータを加工するクラス。
$TL->print 、 $template->flush によるコードからの出力は、 $TL->setContentFilter によって指定されたフィルタにより加工されてから出力される。
_new
$filter = $TL->newFilter(%filteroption)
Tripletail::Filter オブジェクトを作成。 フィルタの初期化を行う。
addHeader
各フィルターの動作による。
setHeader
print
$content = $filter->print($content)
出力すべき内容を受け取り、必要ならデータを加工し、出力すべき内容を返す。
flush
$content = $filter->flush
全ての出力内容を出力し終えたときに呼び出される。フィルタ側でバッファしている 内容があれば、その内容を返す。内容がなければ空文字列を返す。
但し、エラー時には呼び出されないこともある。
(0.44 以降、再初期化処理は "reset" メソッドに分離)
reset
$content = $filter->reset
リクエスト処理の終了時に呼び出される。
FCGI使用時には、フィルタオブジェクトは各リクエストの間で使い回される為、 このメソッドで必ず内部状態を初期化する必要がある。
(0.44 以降, 0.43 までは "flush" の一部でした。)
Copyright 2006 YMIRLINK Inc.
This framework is free software; you can redistribute it and/or modify it under the same terms as Perl itself
このフレームワークはフリーソフトウェアです。あなたは Perl と同じライセンスの 元で再配布及び変更を行うことが出来ます。
Address bug reports and comments to: tl@tripletail.jp
HP : http://tripletail.jp/
To install Tripletail, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tripletail
CPAN shell
perl -MCPAN -e shell install Tripletail
For more information on module installation, please visit the detailed CPAN module installation guide.