| 1 | #!perl | ||
| 2 | # -*- perl -*- | ||
| 3 | # | ||
| 4 | # DO NOT EDIT, created automatically by mkprereqinst.pl | ||
| 5 | |||
| 6 | # on Sat Aug 2 00:42:30 2003 | ||
| 7 | # | ||
| 8 | |||
| 9 | use Getopt::Long; | ||
| 10 | my $require_errors; | ||
| 11 | my $use = 'cpan'; | ||
| 12 | |||
| 13 | if (!GetOptions("ppm" => sub { $use = 'ppm' }, | ||
| 14 | "cpan" => sub { $use = 'cpan' }, | ||
| 15 | )) { | ||
| 16 | die "usage: $0 [-ppm | -cpan]\n"; | ||
| 17 | } | ||
| 18 | |||
| 19 | if ($use eq 'ppm') { | ||
| 20 | require PPM; | ||
| 21 | do { print STDERR 'Install URI-Escape'.qq(\n); PPM::InstallPackage(package => 'URI-Escape') or warn ' (not successful)'.qq(\n); } if !eval 'require URI::Escape'; | ||
| 22 | do { print STDERR 'Install LWP-UserAgent'.qq(\n); PPM::InstallPackage(package => 'LWP-UserAgent') or warn ' (not successful)'.qq(\n); } if !eval 'require LWP::UserAgent'; | ||
| 23 | do { print STDERR 'Install HTTP-Request'.qq(\n); PPM::InstallPackage(package => 'HTTP-Request') or warn ' (not successful)'.qq(\n); } if !eval 'require HTTP::Request'; | ||
| 24 | do { print STDERR 'Install Text-ParseWords'.qq(\n); PPM::InstallPackage(package => 'Text-ParseWords') or warn ' (not successful)'.qq(\n); } if !eval 'require Text::ParseWords; Text::ParseWords->VERSION(3.2)'; | ||
| 25 | do { print STDERR 'Install HTML-TreeBuilder'.qq(\n); PPM::InstallPackage(package => 'HTML-TreeBuilder') or warn ' (not successful)'.qq(\n); } if !eval 'require HTML::TreeBuilder'; | ||
| 26 | do { print STDERR 'Install URI-URL'.qq(\n); PPM::InstallPackage(package => 'URI-URL') or warn ' (not successful)'.qq(\n); } if !eval 'require URI::URL'; | ||
| 27 | do { print STDERR 'Install WWW-Search'.qq(\n); PPM::InstallPackage(package => 'WWW-Search') or warn ' (not successful)'.qq(\n); } if !eval 'require WWW::Search; WWW::Search->VERSION(2.35)'; | ||
| 28 | do { print STDERR 'Install LWP'.qq(\n); PPM::InstallPackage(package => 'LWP') or warn ' (not successful)'.qq(\n); } if !eval 'require LWP; LWP->VERSION(5.48)'; | ||
| 29 | do { print STDERR 'Install LWP-RobotUA'.qq(\n); PPM::InstallPackage(package => 'LWP-RobotUA') or warn ' (not successful)'.qq(\n); } if !eval 'require LWP::RobotUA'; | ||
| 30 | do { print STDERR 'Install HTML-Form'.qq(\n); PPM::InstallPackage(package => 'HTML-Form') or warn ' (not successful)'.qq(\n); } if !eval 'require HTML::Form; HTML::Form->VERSION(0.02)'; | ||
| 31 | do { print STDERR 'Install HTTP-Status'.qq(\n); PPM::InstallPackage(package => 'HTTP-Status') or warn ' (not successful)'.qq(\n); } if !eval 'require HTTP::Status'; | ||
| 32 | do { print STDERR 'Install HTTP-Cookies'.qq(\n); PPM::InstallPackage(package => 'HTTP-Cookies') or warn ' (not successful)'.qq(\n); } if !eval 'require HTTP::Cookies'; | ||
| 33 | do { print STDERR 'Install HTTP-Response'.qq(\n); PPM::InstallPackage(package => 'HTTP-Response') or warn ' (not successful)'.qq(\n); } if !eval 'require HTTP::Response'; | ||
| 34 | do { print STDERR 'Install URI'.qq(\n); PPM::InstallPackage(package => 'URI') or warn ' (not successful)'.qq(\n); } if !eval 'require URI'; | ||
| 35 | do { print STDERR 'Install User'.qq(\n); PPM::InstallPackage(package => 'User') or warn ' (not successful)'.qq(\n); } if !eval 'require User; User->VERSION(1.05)'; | ||
| 36 | do { print STDERR 'Install Tie-Persistent'.qq(\n); PPM::InstallPackage(package => 'Tie-Persistent') or warn ' (not successful)'.qq(\n); } if !eval 'require Tie::Persistent; Tie::Persistent->VERSION(0.901)'; | ||
| 37 | do { print STDERR 'Install URI-http'.qq(\n); PPM::InstallPackage(package => 'URI-http') or warn ' (not successful)'.qq(\n); } if !eval 'require URI::http'; | ||
| 38 | do { print STDERR 'Install Storable'.qq(\n); PPM::InstallPackage(package => 'Storable') or warn ' (not successful)'.qq(\n); } if !eval 'require Storable; Storable->VERSION(0.6)'; | ||
| 39 | do { print STDERR 'Install XML-XPath'.qq(\n); PPM::InstallPackage(package => 'XML-XPath') or warn ' (not successful)'.qq(\n); } if !eval 'require XML::XPath'; | ||
| 40 | } else { | ||
| 41 | use CPAN; | ||
| 42 | install 'URI::Escape' if !eval 'require URI::Escape'; | ||
| 43 | install 'LWP::UserAgent' if !eval 'require LWP::UserAgent'; | ||
| 44 | install 'HTTP::Request' if !eval 'require HTTP::Request'; | ||
| 45 | install 'Text::ParseWords' if !eval 'require Text::ParseWords; Text::ParseWords->VERSION(3.2)'; | ||
| 46 | install 'HTML::TreeBuilder' if !eval 'require HTML::TreeBuilder'; | ||
| 47 | install 'URI::URL' if !eval 'require URI::URL'; | ||
| 48 | install 'WWW::Search' if !eval 'require WWW::Search; WWW::Search->VERSION(2.35)'; | ||
| 49 | install 'LWP' if !eval 'require LWP; LWP->VERSION(5.48)'; | ||
| 50 | install 'LWP::RobotUA' if !eval 'require LWP::RobotUA'; | ||
| 51 | install 'HTML::Form' if !eval 'require HTML::Form; HTML::Form->VERSION(0.02)'; | ||
| 52 | install 'HTTP::Status' if !eval 'require HTTP::Status'; | ||
| 53 | install 'HTTP::Cookies' if !eval 'require HTTP::Cookies'; | ||
| 54 | install 'HTTP::Response' if !eval 'require HTTP::Response'; | ||
| 55 | install 'URI' if !eval 'require URI'; | ||
| 56 | install 'User' if !eval 'require User; User->VERSION(1.05)'; | ||
| 57 | install 'Tie::Persistent' if !eval 'require Tie::Persistent; Tie::Persistent->VERSION(0.901)'; | ||
| 58 | install 'URI::http' if !eval 'require URI::http'; | ||
| 59 | install 'Storable' if !eval 'require Storable; Storable->VERSION(0.6)'; | ||
| 60 | install 'XML::XPath' if !eval 'require XML::XPath'; | ||
| 61 | } | ||
| 62 | if (!eval 'require URI::Escape;') { warn $@; $require_errors++ } | ||
| 63 | if (!eval 'require LWP::UserAgent;') { warn $@; $require_errors++ } | ||
| 64 | if (!eval 'require HTTP::Request;') { warn $@; $require_errors++ } | ||
| 65 | if (!eval 'require Text::ParseWords; Text::ParseWords->VERSION(3.2);') { warn $@; $require_errors++ } | ||
| 66 | if (!eval 'require HTML::TreeBuilder;') { warn $@; $require_errors++ } | ||
| 67 | if (!eval 'require URI::URL;') { warn $@; $require_errors++ } | ||
| 68 | if (!eval 'require WWW::Search; WWW::Search->VERSION(2.35);') { warn $@; $require_errors++ } | ||
| 69 | if (!eval 'require LWP; LWP->VERSION(5.48);') { warn $@; $require_errors++ } | ||
| 70 | if (!eval 'require LWP::RobotUA;') { warn $@; $require_errors++ } | ||
| 71 | if (!eval 'require HTML::Form; HTML::Form->VERSION(0.02);') { warn $@; $require_errors++ } | ||
| 72 | if (!eval 'require HTTP::Status;') { warn $@; $require_errors++ } | ||
| 73 | if (!eval 'require HTTP::Cookies;') { warn $@; $require_errors++ } | ||
| 74 | if (!eval 'require HTTP::Response;') { warn $@; $require_errors++ } | ||
| 75 | if (!eval 'require URI;') { warn $@; $require_errors++ } | ||
| 76 | if (!eval 'require User; User->VERSION(1.05);') { warn $@; $require_errors++ } | ||
| 77 | if (!eval 'require Tie::Persistent; Tie::Persistent->VERSION(0.901);') { warn $@; $require_errors++ } | ||
| 78 | if (!eval 'require URI::http;') { warn $@; $require_errors++ } | ||
| 79 | if (!eval 'require Storable; Storable->VERSION(0.6);') { warn $@; $require_errors++ } | ||
| 80 | if (!eval 'require XML::XPath;') { warn $@; $require_errors++ }warn "Autoinstallation of prerequisites completed\n" if !$require_errors; |