# Copyright (c) 1997-2001 XAO Inc. ############################################################################### use ExtUtils::MakeMaker; use ExtUtils::Manifest; ## # Reading configuration # my %d; if(open(F,'.config')) { local($/); my $t=; close(F); eval $t; } while(!$d{test_dsn}) { print <); if($str) { if($str =~ /^\s*(OS:(\w+):(\w+)(;.*?)?)\s*$/) { $dsn=$1; } else { die "Incorrect DSN entered!\n"; } } chomp(my $user=`whoami`); print "User name: [$user] "; chomp($str=); if($str && $str=~/^\s*(.*?)\s*$/) { $user=$1; } my $pass=''; print "Password: [$pass] "; chomp($str=); if($str && $str=~/^\s*(.*?)\s*$/) { $pass=$1; } print <); if(!$str || lc($str)=~/y/) { open(F,">.config") || die "Can't open .config: $!\n"; print F <) { if(/^=(\w+)/) { $pod=1; last; } } $pod || die "$n ($man) does not have documentation"; $man3pods{$n}='$(INST_MAN3DIR)/' . $man . '.3'; } use XAO::Base qw($homedir); WriteMakefile( 'ABSTRACT' => 'XAO Web templating system', 'AUTHOR' => 'Andrew Maltsev, http://ejelta.com/xao/', 'NAME' => 'XAO::Web', 'VERSION_FROM' => 'Web.pm', 'PREREQ_PM' => { 'CGI' => 2.91, 'Digest::MD5' => 2.13, 'MIME::Lite' => 2.117, 'Error' => 0.15, 'XAO::Base' => 1.06, 'XAO::FS' => 1.06, 'Text::FormatTable' => 0.01, }, 'INSTALLBIN' => $homedir . '/bin', 'INSTALLSCRIPT' => $homedir . '/handlers', 'EXE_FILES' => [ 'handlers/xao-apache.pl' ], 'MAN3PODS' => \%man3pods, ); sub MY::postamble { < README install:: [ -d $homedir ] || mkdir $homedir && chmod 755 $homedir \@\$(PERL) -Mblib \\ -MXAO::PluginUtils=install_templates \\ -e'install_templates("MANIFEST")' EOT }