免费注册 查看新帖 |

Chinaunix

广告
  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1542 | 回复: 2
打印 上一主题 下一主题

请教关于perl模块里头的一个小问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-01-16 18:02 |只看该作者 |倒序浏览
sub new
{
    my $class = shift;
    my $self = {};
    my $description = shift;

    $self->{JobDescription} = $description;

    if(defined($description->logfile()))
    {
        local(*FH);
        open(FH, '>>'. $description->logfile());
        select((select(FH),$|=1)[$[]);
        $self->{log} = *FH;
    }

    bless $self, $class;

    $self->log("New Perl JobManager created.");

    return $self;
}

=item $manager->log($string)

Log a message to the job manager log file. The message is preceded by
a timestamp.

=cut

上面的代码是我从一个perl模块里头摘下来的,很明显有一个 new的子过程定义,我想问的是,紧接着new定义之后的代码行:
   “ =item $manager->log($string)

      Log a message to the job manager log file. The message is preceded by
     a timestamp.

      =cut
”是什么意思啊??这样的格式我以前没见过,请问是用来干什么的?

论坛徽章:
1
2015年辞旧岁徽章
日期:2015-03-03 16:54:15
2 [报告]
发表于 2007-01-16 18:25 |只看该作者
这个是注释,不是程序。
perldoc perlpod

论坛徽章:
0
3 [报告]
发表于 2007-01-16 18:26 |只看该作者
it's comment
check perlpod document.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP