13.07.2015 Views

Perl 语言编程 - Linux教程

Perl 语言编程 - Linux教程

Perl 语言编程 - Linux教程

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

$self->pathname($name);# NEWif ($form =~ />/) {print $self "\n" or croak "can't start print: $!";$$self->{WRITING} = 1;# Remember to do end tag}else {$$self->{WRITING} = 0;# Remember not to do end tag}return 1;}有 些 地 方 你 还 需 要 调 用 $self->debug(1) 打 开 调 试 。 如 果 你 这 么 做 , 那 么 你 的 所 有Carp::cluck 调 用 都 将 会 生 成 有 意 义 的 信 息 。 下 面 是 我 们 做 上 面 的 reopen 的 时 候 得 到 的信 息 。 它 给 我 们 显 示 了 三 个 深 藏 的 方 法 , 当 时 我 们 正 在 关 闭 旧 文 件 并 且 准 备 打 开 新 文 件 :trace magical method at foo line 87Shout::SEEK('>filename', '>filename', 0, 2) called at foo line 81Shout::CLOSE('>filename') called at foo line 65Shout::OPEN('>filename', '+

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!