Behavior of merge_range adjusted #35559
[p5sagit/Excel-Template.git] / Makefile.PL
index 559544e..607a3af 100644 (file)
@@ -1,44 +1,40 @@
-use strict;
+use inc::Module::Install;
 
-use ExtUtils::MakeMaker;
-{
-    no strict 'refs';
-
-    my $libscan = \&{"ExtUtils::MM_Any::libscan"};
-    *{"ExtUtils::MM_Any::libscan"} = sub {
-        return '' unless $libscan->(@_);
-        return '' if $_[1] =~ /\.swp$/;
-        return $_[1];
-    };
-}
+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',
+    },
+);
 
-my $prereqs = {
-    'Test::More'              => 0.01,
-    'XML::Parser'             => 0.01,
-    'IO::Scalar'              => 0.01,
-    'File::Basename'          => 0.01,
-    'Spreadsheet::WriteExcel' => 0.42,
-    'Spreadsheet::WriteExcel::Utility' => 0.01,
-};
+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';
 
-# The assumption is Perl 5.8.0 and greater doesn't need Unicode::String.
+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 ($] < 5.008)
-{
-    eval { require Unicode::String; };
-    if ($@)
-    {
-        print "Note: If you want to work with Unicode, you will need to install";
-        print "the optional module Unicode::String and set USE_UNICODE to true.";
-    }
+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';
 }
 
-WriteMakefile(
-    NAME         => 'Excel::Template',
-    VERSION_FROM => 'lib/Excel/Template.pm', # finds $VERSION
-    ABSTRACT     => 'Excel::Template',
-    PREREQ_PM    => $prereqs,
-    ($] >= 5.005 ?
-       (ABSTRACT_FROM => 'lib/Excel/Template.pm',
-        AUTHOR       => 'Rob Kinyon (rob.kinyon@gmail.com)') : ()),
-);
+auto_install;
+
+WriteAll;
+