1use ExtUtils::MakeMaker;
2# See lib/ExtUtils/MakeMaker.pm for details of how to influence
3# the contents of the Makefile that is written.
4WriteMakefile(
5    NAME          => 'XML::SAX::Expat',
6    VERSION_FROM  => 'Expat.pm',
7    AUTHOR        => 'Robin Berjon',
8    ABSTRACT      => 'SAX Driver for Expat',
9    PREREQ_PM     => {
10                        XML::SAX::Base          => '1.00',
11                        XML::Parser             => '2.27',
12                        XML::NamespaceSupport   => '0.03',
13                        XML::SAX                => '0.03',
14                     },
15
16    LICENSE       => 'perl',
17    'dist'        => {
18      PREOP     => 'chmod 600 Makefile.PL',
19      TARFLAGS	=> '--group=none --owner=bjoern --mode=a+rw -cvf',
20      COMPRESS  => 'gzip -9',
21    },
22    META_MERGE => {
23      resources => {
24        repository  => 'https://github.com/hoehrmann/XML-SAX-Expat',
25      },
26    },
27);
28
29
30## add ourselves to the list of installed parsers
31sub MY::install {
32    package MY;
33    my $script = shift->SUPER::install(@_);
34    unless ($ENV{'SKIP_SAX_INSTALL'}) {
35      $script =~ s/install :: (.*)$/install :: $1 install_sax_expat/m;
36      $script .= <<"INSTALL";
37
38install_sax_expat :
39\t\@\$(PERL) -I\$(INSTALLSITELIB) -MXML::SAX -e "XML::SAX->add_parser(q(XML::SAX::Expat))->save_parsers()"
40
41INSTALL
42    } else {
43      warn "Note: 'make install' will skip XML::SAX::Expat registration with XML::SAX!\n";
44    }
45    return $script;
46}
47