Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
スクリプトを編集せずにデバッグを有効にする方法を思いつきました。ファイル名に .debug を付けるだけで、デバッグがオンになります。
$ touch fancy.pl.debug
私の恐れは、ファイルチェック(すべてのスクリプトの最初にあること)が何らかの形でIO集約的である可能性があることです
$opts{d}++ if (-e "$0.debug");
これは本当でしょうか?このチェックを行う、または多くのスクリプトでデバッグをオン/オフにするより良い方法はありますか?
これは単なるディレクトリの読み取りです。軽いはずです。