トレース表示
Devel::Traceモジュールを使います。
利用する際は-dオプションで指定します。
perl -d:Trace foo.plサンプルスクリプト(foo.pl)。
use strict;
use warnings;
foreach my $i (0..1) {
print $i, "\n";
}
実行結果。
>> foo.pl:3: foreach my $i (0..1) {
>> foo.pl:4: print $i, "\n";
0
>> foo.pl:4: print $i, "\n";
1
関連項目
・CGIのデバッグ・関数処理をラップする
・変数値の変更をトレースする
