Commit | Line | Data |
d0eafc11 |
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. |
a8441e01 |
4 | |
b6bc5a5d |
5 | use strict; |
a8441e01 |
6 | |
7 | my $prereqs = { |
8 | 'Test::Simple' => 0.44, |
b6bc5a5d |
9 | 'Spreadsheet::WriteExcel' => 0.42, |
a8441e01 |
10 | 'XML::Parser' => 0.01, |
37513eae |
11 | 'IO::Scalar' => 0.01, |
a8441e01 |
12 | 'File::Basename' => 0.01, |
a8441e01 |
13 | }; |
14 | |
b6bc5a5d |
15 | # The assumption is Perl 5.8.0 and greater doesn't need Unicode::String. |
16 | |
17 | my $use_unicode = 0; |
a8441e01 |
18 | if ($] < 5.008) |
19 | { |
20 | print "Do you want Unicode support? "; |
21 | my $answer = <STDIN>; |
22 | my $need_unicode = $answer =~ /^[Yy]/; |
23 | |
a8441e01 |
24 | if ($need_unicode) |
25 | { |
b6bc5a5d |
26 | $prereqs->{'Unicode::String'} = '0.01'; |
a8441e01 |
27 | $use_unicode = 1; |
28 | } |
29 | } |
30 | |
b6bc5a5d |
31 | my $pm_filter = $use_unicode |
32 | ? 'perl -p -e "s!UNI_YES ! !g;s!UNI_NO !\\#!g"' |
33 | : 'perl -p -e "s!UNI_NO ! !g;s!UNI_YES !\\#!g"'; |
a8441e01 |
34 | |
d0eafc11 |
35 | WriteMakefile( |
36 | NAME => 'Excel::Template', |
37 | VERSION_FROM => 'lib/Excel/Template.pm', # finds $VERSION |
a8441e01 |
38 | AUTHOR => 'Rob Kinyon (rob.kinyon@gmail.com)', |
d0eafc11 |
39 | ABSTRACT => 'Excel::Template', |
a8441e01 |
40 | PREREQ_PM => $prereqs, |
b6bc5a5d |
41 | PM_FILTER => $pm_filter, |
d0eafc11 |
42 | ); |