-use ExtUtils::MakeMaker;
-# See lib/ExtUtils/MakeMaker.pm for details of how to influence
-# the contents of the Makefile that is written.
+use inc::Module::Install;
-use strict;
-
-my $prereqs = {
- 'Spreadsheet::WriteExcel' => 0.42,
- 'Test::More' => 0.01,
- 'XML::Parser' => 0.01,
- 'IO::Scalar' => 0.01,
- 'File::Basename' => 0.01,
-};
+name 'Excel-Template';
+perl_version '5.006';
+all_from 'lib/Excel/Template.pm';
+author q{Rob Kinyon <rob.kinyon@gmail.com>};
+license 'perl';
+resources(
+ repository => {
+ url => 'git://git.shadowcat.co.uk/p5sagit/Excel-Template.git',
+ web => 'http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit/Excel-Template.git;a=summary',
+ type => 'git',
+ },
+);
-# The assumption is Perl 5.8.0 and greater doesn't need Unicode::String.
+test_requires 'File::Path' => 0;
+test_requires 'File::Temp' => 0;
+test_requires 'Test::Deep' => '0.095';
+test_requires 'Test::More' => '0.47';
+test_requires 'Test::Exception' => '0.21';
-my $use_unicode = 0;
-if ($] < 5.008)
-{
- print "Do you want Unicode support (y/N)? ";
- my $answer = <STDIN>;
+requires 'Test::More' => 0;
+requires 'XML::Parser' => 0;
+requires 'IO::Scalar' => 0;
+requires 'File::Basename' => 0;
+requires 'Spreadsheet::WriteExcel' => '0.42';
+requires 'Spreadsheet::WriteExcel::Utility' => 0;
- if ($answer =~ /^[Yy]/)
- {
- $prereqs->{'Unicode::String'} = '0.01';
- $use_unicode = 1;
- }
+if ($] < 5.008) {
+ print "#\n";
+ print "# Note: If you want to work with Unicode, you will need to install\n";
+ print "# the optional module Unicode::String and set USE_UNICODE to true.\n";
+ print "#\n";
+ recommends 'Unicode::String';
}
-my $pm_filter = $use_unicode
- ? q{perl -pi.old -e "s!UNI_YES ! !g;s!UNI_NO !\\#!g"}
- : q{perl -pi.old -e "s!UNI_NO ! !g;s!UNI_YES !\\#!g"}
-;
+auto_install;
+
+WriteAll;
-WriteMakefile(
- NAME => 'Excel::Template',
- VERSION_FROM => 'lib/Excel/Template.pm', # finds $VERSION
- AUTHOR => 'Rob Kinyon (rob.kinyon@gmail.com)',
- ABSTRACT => 'Excel::Template',
- PREREQ_PM => $prereqs,
- PM_FILTER => $pm_filter,
-);