sort soft prereqs.
[sepia.git] / Makefile.PL
blobc5b5e0bd26e7ceed1e790558f53c8b8f82e04c08
1 use ExtUtils::MakeMaker qw(WriteMakefile prompt);
2 use 5.006;                      # for "no warnings" -- sorry!
3 # See lib/ExtUtils/MakeMaker.pm for details of how to influence
4 # the contents of the Makefile that is written.
6 print <<EOS;
7 NOTE:
8     To actually use this package in a useful way, you probably need to
9     move the Emacs Lisp files somewhere.  Where will depend on your
10     installation.
12     You will also need to install the HTML or Texinfo documentation
13     somewhere appropriate to your system.
14 EOS
16 my %prereq = (
17     'Data::Dumper'    => 0,
18     'Scalar::Util'    => 0,
19     'LWP::Simple'     => 0,
22 ## Poor man's optional deps.
23 sub test_for
25     my $mod = shift;
26     eval "require $mod";
27     if ($@) {
28         my $resp = prompt("@_.  Install $mod [yN]? ", 'n');
29         $prereq{$mod} = 0 if $resp =~ /^y/i;
30     }
33 test_for 'Devel::Size', 'Printing variable sizes requires Devel::Size';
34 test_for 'Lexical::Persistence', 'Strict mode requires Lexical::Persistence';
35 test_for 'Module::CoreList', 'sepia-core-version requires Module::CoreList';
36 test_for 'Module::Info', 'Required for some Emacs functions';
37 test_for 'PadWalker', 'Stack/lexical inspection requires PadWalker >= 1.0';
38 # test_for 'Pod::Webserver', 'Pod::Webserver creates nice documentation.';
39 # test_for 'Scope::Upper', 'Required for return-from-context';
41 WriteMakefile(
42     'NAME'              => 'Sepia',
43     'VERSION_FROM'      => 'lib/Sepia.pm', # finds $VERSION
44     'PREREQ_PM'         => \%prereq,
45     AUTHOR     => "Sean O'Rourke <seano\@cpan.org>",
46     ABSTRACT => 'Simple Emacs-Perl InterAction',