Subject: | YAML check during `Build dist' is twice over buggy. |
If Module::Build is installed into a perl without YAML, M::B appears to store that information into M::B::ConfigData. Later, when `Build dist' or `Build disttest' is run on a module, it continues to believe that YAML is not installed even if it is. M::B should actually try to load YAML before deciding that it isn't available and this should happen at runtime, every time.
Also, the message emitted when YAML isn't going to be loaded is deceptively misleading. It says that YAML.pm couldn't be loaded, not that it isn't going to be. The message implies that M::B tried to load YAML but for some reason couldn't. To work around this, I called Build with a perl that had YAML pre-loaded and was extremely confused when M::B *still* insisted that YAML couldn't be found. That is, it told me that it couldn't find YAML but it was already loaded!
By grepping the source of my on-disk modules, I found that I had to manually edit the __DATA__ portion of Module to re-enable the use of YAML.
Also, the non-YAML.pm part of M::B that generates META.yml creates a syntactically incorrect file. If YAML can't be loaded, M::B probably shouldn't attempt to create the YAML file.
By M::B and incorrectly:
author:
- "Joshua ben Jore" <jjore@cpan.org>
By YAML and correctly:
author:
- '"Joshua ben Jore" <jjore@cpan.org>'