首页 > 其他 > 详细

[Perl] Smart::Comments

时间:2015-03-02 18:16:20      阅读:242      评论:0      收藏:0      [点我收藏+]

调试Perl程序时,使用Smart::Comment模块,追踪代码的变量值,非常方便有效。

代码示例:

1 #!/usr/bin/perl
2 
3 use Smart::Comments;
4 # no Smart::Comments;
5 my $var=@ARGV[0]; 6 7 ### $var;

执行代码:

./smartcomment.pl test

执行结果:

### $var: ‘test‘

使用“no Smart::Comments” 代替 “use Smart::Comments”, 可以关闭注释信息。

 

命令行打开Smart::Comments模块的方法:

perl -MSmart::Comments smartcomment.pl test

 

[Perl] Smart::Comments

原文:http://www.cnblogs.com/qixinsoc365/p/4309075.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!