我创建了一个包含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