"Fossies" - the Fresh Open Source Software Archive

Member "checkbot-1.80/Makefile.PL" (26 Feb 2007, 4121 Bytes) of package /linux/www/old/checkbot-1.80.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Perl source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 # This -*- perl -*- script makes the Makefile
    2 # Based on the Makefile.PL in the libwww-perl distribution
    3 # $Id: Makefile.PL 231 2007-02-26 15:51:46Z graaff $
    4 
    5 require 5.005;
    6 use strict;
    7 use ExtUtils::MakeMaker;
    8 
    9 
   10 my $missing_modules = 0;
   11 
   12 print "\nChecking for LWP...........";
   13 eval {
   14     require LWP;
   15     LWP->VERSION(5.803);
   16 };
   17 if ($@) {
   18     print " failed\n";
   19     $missing_modules++;
   20     print <<EOT;
   21 $@
   22 Checkbot depends on LWP (libwww-perl) for almost all actions.
   23 
   24 EOT
   25     sleep(2);  # Don't hurry too much
   26 } else {
   27     print " ok\n";
   28 }
   29 print "Checking for URI...........";
   30 eval {
   31     require URI;
   32     URI->VERSION(1.10);
   33 };
   34 if ($@) {
   35     print " failed\n";
   36     $missing_modules++;
   37     print <<EOT;
   38 $@
   39 The URI module must be installed.  WWW without URIs would not
   40 be that great :-)
   41 
   42 EOT
   43     sleep(2);  # Don't hurry too much
   44 } else {
   45     print " ok\n";
   46 }
   47 print "Checking for HTML::Parser..";
   48 eval {
   49     require HTML::HeadParser;
   50     HTML::Parser->VERSION(3.33);
   51 };
   52 if ($@) {
   53     print " failed\n";
   54     $missing_modules++;
   55     print <<EOT;
   56 $@
   57 The HTML::Parser is needed to extract correct base URI information from
   58 HTML so that we can resolve relative links correctly.  The HTML::Form
   59 module also need HTML::TokeParser to work.
   60 
   61 EOT
   62     sleep(2);  # Don't hurry too much
   63 } else {
   64     print " ok\n";
   65 }
   66 
   67 print "Checking for MIME::Base64..";
   68 eval {
   69     require MIME::Base64;
   70     #MIME::Base64->VERSION('2.00');
   71 };
   72 if ($@) {
   73     print " failed\n";
   74     $missing_modules++;
   75     print <<EOT;
   76 $@
   77 The Base64 encoding is used in authentication headers in HTTP.
   78 
   79 EOT
   80     sleep(2);  # Don't hurry too much
   81 } else {
   82     print " ok\n";
   83 }
   84 
   85 print "Checking for Net::FTP......";
   86 eval {
   87     require Net::FTP;
   88     Net::FTP->VERSION('2.58');
   89 };
   90 if ($@) {
   91     print " failed\n";
   92     $missing_modules++;
   93     print <<EOT;
   94 $@
   95 The libwww-perl library normally use the Net::FTP module when
   96 accessing ftp servers.  You would have to install this package or
   97 configure your application to use a proxy server for making ftp
   98 requests work.  Net::FTP is part of the 'libnet' distribution.
   99 
  100 EOT
  101     sleep(2);  # Don't hurry too much
  102 } else {
  103     print " ok\n";
  104 }
  105 
  106 print "Checking for Digest::MD5 ..";
  107 eval {
  108     require Digest::MD5;
  109 };
  110 if ($@) {
  111     print " failed\n";
  112     $missing_modules++;
  113     print <<EOT;
  114 $@
  115 The Digest::MD5 library is needed if you want to be able use the
  116 experimental "Digest Access Authentication" scheme.  Since very few
  117 servers implement this authentication scheme, you should normally not
  118 worry too much about this.
  119 
  120 EOT
  121 } else {
  122     print " ok\n";
  123 }
  124 
  125 print "Checking for Mail::Send ..";
  126 eval {
  127     require Mail::Send;
  128 };
  129 if ($@) {
  130     print " failed\n";
  131     $missing_modules++;
  132     print <<EOT;
  133 $@ 
  134 
  135 Mail::Send is used to allow Checkbot to send email. You currently
  136 can not use the --mailto option of Checkbot. Mail::Send can be found
  137 in the MailTools package.
  138 
  139 EOT
  140 } else {
  141     print " ok\n";
  142 }
  143 
  144 print "Checking for Time::Duration ..";
  145 eval {
  146     require Time::Duration;
  147 };
  148 if ($@) {
  149     print " failed\n";
  150     $missing_modules++;
  151     print <<EOT;
  152 $@ 
  153 
  154 Time::Duration is used to display information on elapsed time in the
  155 reports. If Time::Duration is not available Checkbot will still work,
  156 but this information is not printed in the report.
  157 
  158 EOT
  159 } else {
  160     print " ok\n";
  161 }
  162 
  163 print "Checking for Net::SSL ..";
  164 eval {
  165     require Net::SSL;
  166 };
  167 if ($@) {
  168     print " failed\n";
  169     $missing_modules++;
  170     print <<EOT;
  171 $@ 
  172 
  173 Net::SSL is used to check https links. If Net::SSL is not available
  174 Checkbot will still work, but it is not possible to check https://
  175 links. Net::SSL is part of the Crypt::SSLeay package. Note that this
  176 package in turn depends on the openssl tools.
  177 
  178 EOT
  179 } else {
  180     print " ok\n";
  181 }
  182 print <<EOT if $missing_modules;
  183 The missing modules can be obtained from CPAN.  Visit
  184 <URL:http://www.perl.com/CPAN/> to find a CPAN site near you.
  185 
  186 EOT
  187 
  188 print "\n";
  189 
  190 # Write the Makefile
  191 WriteMakefile(
  192           NAME   => "checkbot",
  193           EXE_FILES => [ 'checkbot' ],
  194           MAN3PODS => {},
  195           PM => {},
  196           VERSION_FROM => q(checkbot),
  197           dist => {COMPRESS => 'gzip',
  198                SUFFIX => 'gz' },
  199 );
  200