Subject: | dzil breaks without notice if dist.ini has a Unicode BOM |
If you get this error message:
[DZ] building test distribution under .build/UIcrQxTaoF
Attribute name must be provided before calling reader at
/usr/local/share/perl/5.10.1/MooseX/LazyRequire/Meta/Attribute/Trait/Laz
yRequire.pm line 40
MooseX::LazyRequire::Meta::Attribute::Trait::LazyRequire::__ANON__('Dist
::Zilla::Dist::Builder=HASH(0x9e4e368)') called at
/usr/local/lib/perl/5.10.1/Class/MOP/Mixin/AttributeCore.pm line 45
Class::MOP::Mixin::AttributeCore::default('Moose::Meta::Class::__ANON__:
:SERIAL::7=HASH(0x9bb78b0)',
'Dist::Zilla::Dist::Builder=HASH(0x9e4e368)') called at accessor
Dist::Zilla::name (defined at lib/Dist/Zilla.pm line 60) line 6
Dist::Zilla::name('Dist::Zilla::Dist::Builder=HASH(0x9e4e368)')
called at lib/Dist/Zilla/Dist/Builder.pm line 292
Dist::Zilla::Dist::Builder::build_in('Dist::Zilla::Dist::Builder=HASH(0x
9e4e368)', 'Path::Class::Dir=HASH(0x9e4dd38)') called at
lib/Dist/Zilla/Dist/Builder.pm line 362
Dist::Zilla::Dist::Builder::ensure_built_in('Dist::Zilla::Dist::Builder=
HASH(0x9e4e368)', 'Path::Class::Dir=HASH(0x9e4dd38)') called at
lib/Dist/Zilla/Dist/Builder.pm line 551
Dist::Zilla::Dist::Builder::test('Dist::Zilla::Dist::Builder=HASH(0x9e4e
368)') called at lib/Dist/Zilla/App/Command/smoke.pm line 63
Dist::Zilla::App::Command::smoke::execute('Dist::Zilla::App::Command::sm
oke=HASH(0x97e0df0)',
'Getopt::Long::Descriptive::Opts::__OPT__::2=HASH(0x986c158)',
'ARRAY(0x8c7dbd8)') called at /usr/local/share/perl/5.10.1/App/Cmd.pm
line 231
App::Cmd::execute_command('Dist::Zilla::App=HASH(0x97d6d98)',
'Dist::Zilla::App::Command::smoke=HASH(0x97e0df0)',
'Getopt::Long::Descriptive::Opts::__OPT__::2=HASH(0x986c158)') called at
/usr/local/share/perl/5.10.1/App/Cmd.pm line 170
App::Cmd::run('Dist::Zilla::App') called at bin/dzil line 12
You will search for hours until you may finally find the reason: dzil
breaks if your dist.ini has a Byte Order Mark (BOM). You can reproduce
the error the following way:
$ vim dist.ini
:set bomb
:wq
$ dzil smoke