add this
[sepia.git] / Makefile.PL
blob2c35bcba3214cddbdc73fc8132040f6689431ac5
1 use ExtUtils::MakeMaker;
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,
21 ## Poor man's optional deps.
22 sub test_for
24     my $mod = shift;
25     eval "require $mod";
26     if ($@) {
27         if (-t STDIN) {
28             $| = 1;
29             print "@_.  Install $mod [yN]? ";
30             my ($rfd, $wfd, $efd) = ('', '', '');
31             vec($rfd, fileno(STDIN), 1) = 1;
32             if (select $rfd, $wfd, $efd, 60.0) {
33                 my $resp = <STDIN>;
34                 $prereq{$mod} = 0 if $resp =~ /^y/i;
35             }
36         } else {
37             print "@_\n";
38         }
39     }
42 test_for 'PadWalker', 'Stack/lexical inspection requires PadWalker >= 1.0';
43 test_for 'Lexical::Persistence', 'Strict mode requires Lexical::Persistence';
44 test_for 'Module::CoreList', 'sepia-core-version requires Module::CoreList';
45 test_for 'Devel::Size', 'Printing variable sizes requires Devel::Size';
46 test_for 'Module::Info', 'Module::Info required for some Emacs functions';
48 WriteMakefile(
49     'NAME'              => 'Sepia',
50     'VERSION_FROM'      => 'lib/Sepia.pm', # finds $VERSION
51     'PREREQ_PM'         => \%prereq,
52     AUTHOR     => "Sean O'Rourke <seano\@cpan.org>",
53     ABSTRACT => 'Simple Emacs-Perl InterAction',