Apache-Wyrd
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
print "\nWyrds require Blowfish Crypto, which comes in xs or pure perl.\n";
print "Checking for (faster, preferred) xs version...\n";
eval ('use Crypt::Blowfish');
if ($@) {
print "Falling back on pure perl version.\n";
eval('use Crypt::Blowfish_PP');
$blowfish .= '_PP' unless ($@);
print "No Blowfish Crypto found!\n" if ($@);
} else {
print "Good. You have Crypt::Blowfish\n";
}
print "\nWyrds require a CGI interpreter, either libapreq or CGI.\n";
print "Checking for (faster, preferred) libapreq...\n";
eval ('use Apache::Request');
if ($@) {
print "Falling back on CGI.\n";
eval('use CGI');
$cgi = 'CGI' unless ($@);
print "But I can't find either!\n" if ($@);
} else {
print "Good. You have Apache::Request\n";
}
print "\nWyrds require a Cookie module.\n";
print "Checking for (faster, preferred) Apache::Cookie...\n";
eval ('use Apache::Cookie');
if ($@) {
print "Falling back on CGI::Cookie.\n";
eval('use CGI::Cookie');
$cookie = 'CGI::Cookie' unless ($@);
print "But I can't find either!\n" if ($@);
} else {
print "Good. You have Apache::Cookie\n";
}
}
if ($have_atest) {
print "\nOK... Generating Makefile and TEST...\n";
Apache::TestMM::filter_args();
Apache::TestMM::generate_script('t/TEST');
} else {
use Config;
print "\nOK... Generating Makefile...\n";
};
my $makefile = WriteMakefile(
'NAME' => 'Apache::Wyrd',
'VERSION_FROM' => 'Wyrd.pm',
'PREREQ_PM' => {
Apache => 1.26,
Apache::Constants => 0,
Apache::URI => 0,
Apache::Util => 0,
BerkeleyDB => .23,
Class::Singleton => 0,
DBI => 0,
Digest::SHA => 0,
HTML::Entities => 0,
HTTP::Request::Common => 0,
LWP::UserAgent => 0,
MIME::Base64 => 0,
XML::Dumper => .67,
$blowfish => 0,
$cgi => 0,
$cookie => 0
},
AUTHOR => 'barry king <wyrd@nospam.wyrdwright.com>',
clean => {
FILES => q(
t/TEST
t/data/testindex.db
t/data/testindex2.db
t/data/testindex3.db
t/data/testindex2_big.db
t/data/ticketbook.db
t/data/cookies.txt
t/data/__db.???
t/logs
t/conf/modperl_startup.pl
t/htdocs/index.html
)
}
);
my $wyrd_version = $makefile->{VERSION};
my $perl_version = $];
my $os = $^O;
my $bdb = $BerkeleyDB::db_version;
my $error = 0;
my $ua = undef;
my $url = 'http://www.wyrdwright.com/wyrd/wyrd_counter.html';
eval('use LWP::UserAgent');
$error ||= $@;
eval('use HTTP::Request::Common');
$error ||= $@;
eval('$ua = LWP::UserAgent->new');
$error ||= $@;
eval('$ua->timeout(20)');
$error ||= $@;
exit 0 if ($error);
print <<__MSG__;
==================
SURVEY REQUEST
==================
The author of Apache::Wyrd would like to know what version of perl and
the operating system you are using to better support your system. The
information would be sent by HTTP to the www.wyrdwright.com site which
will log the time and the source of the information (IP address). NO
OTHER SYSTEM INFORMATION WILL BE SENT THAN THE FOLLOWING:
Apache::Wyrd version: $wyrd_version
perl version: $perl_version
Operating System: $os
mod_perl version: $mod_perl_version
Berkeley DB version: $bdb
May I send this information to the Author?
__MSG__
my $ok = prompt('Send info (y/n)?', 'y');
if (lc($ok) ne 'y') {
print "OK, I won't send it...\n\n";
exit 0;
} else {
print "Thanks. Sending...\n\n";
eval '
use LWP::UserAgent;
use HTTP::Request::Common;
$ua = LWP::UserAgent->new;
$ua->timeout(20);
$ua->request(POST $url,
[
perl => $perl_version,
mod_perl => $mod_perl_version,
os => $os,
bdb => $bdb,
wyrds => $wyrd_version
]
);
';
}
( run in 1.223 second using v1.01-cache-2.11-cpan-0bb4e1dffa6 )