Subject: | CPAN install fails |
Hiya,
I've had several problems installing Encode-Detect on Mac OS X; I imagine the same problems will be found on other systems. Hopefully this feedback will help:
1. 'Your' Makefile.PL does not work.
You have a stub Makefile.PL that was auto-generated by CPAN.pm. As you're using Module::Build, you probably don't want this to happen. Instead, you can use this parameter for M::B->new:
create_makefile_pl => 'passthrough',
This will create a Makefile.PL that uses your Build.PL when you run a './Build dist'.
2. You have un-documented dependencies.
Your tests require:
Test::More
Data::Dump
These should go into Build.PL:
build_requires => { 'Test::More' => '0.01', 'Data::Dump' => 0.01 }
See the patch attached.
If you've got any questions, I'm happy to help, otherwise check out the Module-Build list:
http://lists.sourceforge.net/lists/listinfo/module-build-general
hth,
-Steve
use Module::Build;
my $build = Module::Build->new
(
module_name => 'Encode::Detect',
create_makefile_pl => 'passthrough',
license => 'mozilla',
c_source => 'src',
build_requires => { 'Test::More' => '0.01', 'Data::Dump' => 0.01 },
pm_files => { 'Detect.pm' => 'lib/Encode/Detect.pm',
'Detector.pm' => 'lib/Encode/Detect/Detector.pm',
},
xs_files => { 'Detector.xs' => 'lib/Encode/Detect/Detector.xs' },
dist_version_from => 'Detect.pm',
extra_compiler_flags => ['-x', 'c++', '-Iinclude'],
extra_linker_flags => ['-lstdc++'],
);
$build->create_build_script;