我創建了一個包含Switch
模塊的perl腳本。Perl PP不包含切換模塊
hello_world.pl
use strict;
use warnings;
use Switch;
use Data::Dumper;
my $var = "Hello World\n";
print Dumper($var);
如果我啓動perl hello_world.pl
一切工作正常。但是,如果我收拾我的腳本pp hello_world.pl
比推出./a.out
它給我回個錯誤:
Can't locate Switch.pm in @INC (you may need to install the Switch module) (@INC contains: CODE(0x7fb2631e6a88) /var/folders/rb/2b5sbs355n57svwzjjh7cb9c0000gn/T/par-6967676c6f62616c33/cache-710e967842eb844ab8d6fe5f46968c1b6f49e019/inc/lib /var/folders/rb/2b5sbs355n57svwzjjh7cb9c0000gn/T/par-6967676c6f62616c33/cache-710e967842eb844ab8d6fe5f46968c1b6f49e019/inc CODE(0x7fb262988de0) CODE(0x7fb262989930)) at script/hello_world.pl line 3. BEGIN failed--compilation aborted at script/hello_world.pl line 3
我用YAML得到了同樣的問題'使用YAML' – Bizzy