perl类定义必须返回真值
摘要:
package Logger ;use strict ;sub new{ my $class = shift() ; my $self = {} ; bless $self, $class ; return $self ;}sub message{ shift ; my ($msg, $color) = @_ ; print "@: @_ \n" ; my $cmd = "echo -e \033[40;$color$msg\033[0m" ; # this does not work on windows, try it on unix/linux p 阅读全文
posted @ 2011-07-31 23:02 perlman 阅读(670) 评论(0) 推荐(0) 编辑