【发布时间】:2010-12-28 18:02:16
【问题描述】:
我遇到过一些类似于以下代码的 Perl 模块:
package MyPackage;
use strict;
use warnings;
use constant PERL510 => ( $] >= 5.0100 );
require Exporter;
our @ISA = qw(Exporter);
our @EXPORT = qw( );
{ #What is the significance of this curly brace?
my $somevar;
sub Somesub {
#Some code here
}
}
1;
1; 和包围 $somevar 和 Sub 的花括号有什么意义?
【问题讨论】:
-
我很失望 tchrist 没有为此提交答案。
-
从技术上讲,这是两个问题合二为一。我通常会尝试将这些扼杀在萌芽状态,并在答案出现之前编辑一个问题,但现在为时已晚。
标签: perl perl-module