这是一个令人难堪的问题,但为什么这一条线工作,而另一条则没有作用?
Working line:
use strict;
use warning;
use Wx qw(:everything);
my $dialog = Wx::MessageDialog->new(
$self,
"About test
" . "Version 0.01
",
"About Test",
wxOK | wxCENTRE
);
非工作线:
use strict;
use warning;
use Wx;
my $dialog = Wx::MessageDialog->new(
$self,
"About test
" . "Version 0.01
",
"About Test",
wxOK | wxCENTRE
);
3. 非工作线的错误信息:
Bareword "wxOK" not allowed while "strict subs" in use at test.pl line 123.
Bareword "wxCENTRE" not allowed while "strict subs" in use at test.pl line 123.
BEGIN not safe after errors--compilation aborted at test.pl line 348.