Perl 问题:找到了一个违反意图的制表符
我该如何解决这个问题 编辑:我想我修正了缩进,但现在我得到了这个错误:Perl 问题:找到了一个违反意图的制表符,perl,yaml,indentation,cpan,Perl,Yaml,Indentation,Cpan,我该如何解决这个问题 编辑:我想我修正了缩进,但现在我得到了这个错误: ./run-bot Running bot 22496 Error parsing ./shittybot.yml: YAML::XS::Load Error: The problem: found a tab character that violate intendation was found at /usr/local/lib/perl5/site_perl/5.10.1/Config/Any.pm li
./run-bot
Running bot 22496
Error parsing ./shittybot.yml: YAML::XS::Load Error: The problem:
found a tab character that violate intendation
was found at /usr/local/lib/perl5/site_perl/5.10.1/Config/Any.pm line 201
Config::Any::_load('Config::Any', 'HASH(0x8de4708)') called at /usr/local/lib/perl5/site_perl/5.10.1/Config/Any.pm line 94
Config::Any::load_files('Config::Any', 'HASH(0x8de4708)') called at /usr/local/lib/perl5/site_perl/5.10.1/Config/JFDI/Source/Loader.pm line 104
Config::JFDI::Source::Loader::_load_files('Config::JFDI::Source::Loader=HASH(0x85e1d48)', 'ARRAY(0x8de4f48)') called at /usr/local/lib/perl5/site_perl/5.10.1/Config/JFDI/Source/Loader.pm line 62
Config::JFDI::Source::Loader::read('Config::JFDI::Source::Loader=HASH(0x85e1d48)') called at /usr/local/lib/perl5/site_perl/5.10.1/Config/JFDI.pm line 153
Config::JFDI::load('Config::JFDI=HASH(0x85e67c0)') called at /usr/local/lib/perl5/site_perl/5.10.1/Config/JFDI.pm line 140
Config::JFDI::config('Config::JFDI=HASH(0x85e67c0)') called at /usr/local/lib/perl5/site_perl/5.10.1/Config/JFDI.pm line 131
Config::JFDI::get('Config::JFDI=HASH(0x85e67c0)') called at bot.pl line 32
用你的pastebin文件
Error parsing ./shittybot.yml: YAML::XS::Load Error: The problem:
found character that cannot start any token
was found at /usr/local/lib/perl5/site_perl/5.10.1/Config/Any.pm line 201
Config::Any::_load('Config::Any', 'HASH(0xa3da738)') called at /usr/local/lib/perl5/site_perl/5.10.1/Config/Any.pm line 94
Config::Any::load_files('Config::Any', 'HASH(0xa3da738)') called at /usr/local/lib/perl5/site_perl/5.10.1/Config/JFDI/Source/Loader.pm line 104
Config::JFDI::Source::Loader::_load_files('Config::JFDI::Source::Loader=HASH(0x9bd7d48)', 'ARRAY(0xa3daf78)') called at /usr/local/lib/perl5/site_perl/5.10.1/Config/JFDI/Source/Loader.pm line 62
Config::JFDI::Source::Loader::read('Config::JFDI::Source::Loader=HASH(0x9bd7d48)') called at /usr/local/lib/perl5/site_perl/5.10.1/Config/JFDI.pm line 153
Config::JFDI::load('Config::JFDI=HASH(0x9bdc7c0)') called at /usr/local/lib/perl5/site_perl/5.10.1/Config/JFDI.pm line 140
Config::JFDI::config('Config::JFDI=HASH(0x9bdc7c0)') called at /usr/local/lib/perl5/site_perl/5.10.1/Config/JFDI.pm line 131
Config::JFDI::get('Config::JFDI=HASH(0x9bdc7c0)') called at bot.pl line 32
我怀疑如果你升级你的YAML::XS(我的是0.34),你会看到我的例子显示的更好的错误反馈。你能上传
shittybot.yml
到什么地方吗?另外,你不能为一个公共论坛选择一个更雅致的名字吗?如果你有新问题,请问一个新问题;不要通过编辑删除旧文件。本网站的全部要点是,未来用户可以看到原始问题的答案。在显示新错误之前,编辑以还原原始问题的文本。凤凰社,正如菲利普·波特所说,在问题解决后,请不要删除问题的文本,因为这会阻止未来的用户在遇到同样的问题时找到问题。
apv@cassidy[421]~/>perl -MYAML::XS=LoadFile -le 'LoadFile(+shift)' S1tuACcg.txt
YAML::XS::Load Error: The problem:
found a tab character that violate intendation
was found at document: 1, line: 8, column: 1
while scanning a plain scalar at line: 7, column: 18
apv@cassidy[422]~/>perl -lne 'print "TAB!" if /\t/' S1tuACcg.txt
TAB!
TAB!
TAB!
apv@cassidy[423]~/>perl -pi -e 's/\t/ /' S1tuACcg.txt
apv@cassidy[424]~/>perl -MYAML::XS=LoadFile -le \
'LoadFile(+shift) and print "OK!"' S1tuACcg.txt
OK!