Use Smart::Comments module for debugging

上一篇 / 下一篇  2008-11-20 11:35:19 / 个人分类:Perl

use Smart::Comments;
 ### Expected: 2 * $prediction
 ###      Got: $result
would prints:
 ### Expected: 42
 ###      Got: 13

如果只是perl表达式,则:
### 2 * $prediction
### $result
would prints:
### 2 * $prediction: 42
### $result: 13

调试完毕后,不需要移除这些注释行,只需要注释掉第一行即可。

另外这个模块还提供了processing bar功能:
#### Debugging here...

    for (@values) {         ### Progress: 0...  100
        do_stuff();
    }

Click the url below for more details:
http://search.cpan.org/dist/Smart-Comments-v1.0.3/lib/Smart/Comments.pm


TAG: Perl debug smart comments processing bar

 

评分:0

我来说两句

日历

« 2024-04-27  
 123456
78910111213
14151617181920
21222324252627
282930    

数据统计

  • 访问量: 47716
  • 日志数: 80
  • 建立时间: 2008-10-27
  • 更新时间: 2009-07-17

RSS订阅

Open Toolbar