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 = { |
b6bc5a5d |
8 | 'Spreadsheet::WriteExcel' => 0.42, |
dee1f239 |
9 | 'Test::More' => 0.01, |
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 | { |
8ca5e726 |
20 | print "Do you want Unicode support (y/N)? "; |
a8441e01 |
21 | my $answer = <STDIN>; |
a8441e01 |
22 | |
8ca5e726 |
23 | if ($answer =~ /^[Yy]/) |
a8441e01 |
24 | { |
b6bc5a5d |
25 | $prereqs->{'Unicode::String'} = '0.01'; |
a8441e01 |
26 | $use_unicode = 1; |
27 | } |
28 | } |
29 | |
b6bc5a5d |
30 | my $pm_filter = $use_unicode |
8ca5e726 |
31 | ? q{perl -pi.old -e "s!UNI_YES ! !g;s!UNI_NO !\\#!g"} |
32 | : q{perl -pi.old -e "s!UNI_NO ! !g;s!UNI_YES !\\#!g"} |
33 | ; |
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 | ); |