#test.pl
use Getopt::Long;
Getopt::Long::Configure ("bundling");
GetOptions ( 'TestB|B|b' => \$testb ,
'TestA|A|a' => \$testa, );
これが私の状況ですperl test.pl -Ba
だから私は使用しますGetopt::Long::Configure ("bundling");
このため、オプションを使用して実行しようとしても、プログラムは最初は遅くなります
perl test.pl
これを愛する最良の方法はありますか?
ベンチマーク結果:
with Getopt::Long::Configure ("bundling");
real 0m6.101s
user 0m2.040s
sys 0m0.260s
Without Getopt::Long::Configure ("bundling");
real 0m3.019s
user 0m2.020s
sys 0m0.200s