db972f038df38ae1b37a8b91e02232a6557ff255
[p5sagit/Excel-Template.git] / Makefile.PL
1 use strict;
2
3 use ExtUtils::MakeMaker;
4 {
5     no strict 'refs';
6
7     my $libscan = \&{"ExtUtils::MM_Any::libscan"};
8     *{"ExtUtils::MM_Any::libscan"} = sub {
9         return '' unless $libscan->(@_);
10         return '' if $_[1] =~ /\.swp$/;
11         return $_[1];
12     };
13 }
14
15 my $prereqs = {
16     'Spreadsheet::WriteExcel' => 0.42,
17     'Test::More'              => 0.01,
18     'XML::Parser'             => 0.01,
19     'IO::Scalar'              => 0.01,
20     'File::Basename'          => 0.01,
21 };
22
23 # The assumption is Perl 5.8.0 and greater doesn't need Unicode::String.
24
25 if ($] < 5.008)
26 {
27     eval { require Unicode::String; };
28     if ($@)
29     {
30         print "Note: If you want to work with Unicode, you will need to install";
31         print "the optional module Unicode::String and set USE_UNICODE to true.";
32     }
33 }
34
35 WriteMakefile(
36     NAME         => 'Excel::Template',
37     VERSION_FROM => 'lib/Excel/Template.pm', # finds $VERSION
38     ABSTRACT     => 'Excel::Template',
39     PREREQ_PM    => $prereqs,
40     ($] >= 5.005 ?
41        (ABSTRACT_FROM => 'lib/Excel/Template.pm',
42         AUTHOR       => 'Rob Kinyon (rob.kinyon@gmail.com)') : ()),
43 );