- Removed 'use warnings' from all tests
[p5sagit/Excel-Template.git] / Makefile.PL
1 use ExtUtils::MakeMaker;
2 # See lib/ExtUtils/MakeMaker.pm for details of how to influence
3 # the contents of the Makefile that is written.
4
5 use strict;
6
7 my $prereqs = {
8     'Spreadsheet::WriteExcel' => 0.42,
9     'Test::More'              => 0.01,
10     'XML::Parser'             => 0.01,
11     'IO::Scalar'              => 0.01,
12     'File::Basename'          => 0.01,
13 };
14
15 # The assumption is Perl 5.8.0 and greater doesn't need Unicode::String.
16
17 my $use_unicode = 0;
18 if ($] < 5.008)
19 {
20     print "Do you want Unicode support? ";
21     my $answer = <STDIN>;
22     my $need_unicode = $answer =~ /^[Yy]/;
23
24     if ($need_unicode)
25     {
26             $prereqs->{'Unicode::String'} = '0.01';
27             $use_unicode = 1;
28     }
29 }
30
31 my $pm_filter = $use_unicode
32     ? q{perl -pi -e "s!UNI_YES ! !g;s!UNI_NO  !\\#!g"}
33     : q{perl -pi -e "s!UNI_NO  ! !g;s!UNI_YES !\\#!g"};
34
35 WriteMakefile(
36     NAME         => 'Excel::Template',
37     VERSION_FROM => 'lib/Excel/Template.pm', # finds $VERSION
38     AUTHOR       => 'Rob Kinyon (rob.kinyon@gmail.com)',
39     ABSTRACT     => 'Excel::Template',
40     PREREQ_PM    => $prereqs,
41     PM_FILTER    => $pm_filter,
42 );