CPAN-Search-Lite

 view release on metacpan or  search on metacpan

build/gen_conf.pl  view on Meta::CPAN

print <<"END";

The CSL configuration file was written to
   $config
and a sample httpd configuration file as
   $csl_conf
You can now run
   csl_index --conf $config --setup
to set up and populate the database. Afterwards,
   csl_index --conf $config
will update it.

END

sub check_dir {
  my $dir = shift;
  return $dir if (-d $dir);
  if (prompt_y(qq{'$dir' does not exist. Create it?})) {
    mkdir($dir) or die "mkdir $dir failed: $!";
    return $dir;
  }
  warn "Will not create $dir.\n";
  return;
}

sub prompt {
  my ($q, $default) = @_;
  ExtUtils::MakeMaker::prompt($q, $default);
}

sub prompt_y {
  my $q = shift;
  prompt($q, 'yes') =~ /^y/i;
}

sub prompt_n {
  my $q = shift;
  prompt($q, 'no') =~ /^n/i;
}

__DATA__
[% home = 'url_sub' %]
[% 
   PROCESS splash/config;
   search = "$home/search"
   download = 'multiplex_sub'
   doc = 'docs_sub'
   static = 'static_sub'
   main = "$static/cpan-search.html"
   cpanimg = 'img_sub'
   testers = 'http://testers.cpan.org/show/'
   searchcpan = 'http://search.cpan.org/'
   rt = 'http://rt.cpan.org/NoAuth/Bugs.html?Dist='
   splash.images = 'splash_sub'
   cpan = 'http://www.cpan.org'
   backpan = 'http://backpan.cpan.org'
   splash.style.default.col.fore = 'grey75'
   splash.style.default.col.text = 'black'
   splash.style.select.col.fore = 'sky'
   splash.style.select.col.text = 'black'
   splash.style.select.font.bold = 1
   splash.style.select.font.size = '+1'
   maintainer = 'user_sub'
   maintainer_email = 'email_sub'
   faq =  "$static/faq.html"
   dslip = "$static/dslip.html"
   ppm = "$static/ppm.html"
   extra_files = { readme => {name => 'README', link => 'README.html'},
                   meta => {name => 'META', link => 'META.html'},
                   changes => {name => 'Changes', link => 'Changes.html'},
                   install => {name => 'INSTALL', link => 'INSTALL.html'},
                }
%]
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
<Directory "store_sub">
   Options Indexes FollowSymLinks
   AllowOverride None
   Order allow,deny
   Allow from all
</Directory>
<Directory "static_store_sub">
   <Files *.html>
      SetHandler type-map
   </Files>
</Directory>

PerlLoadModule Apache2::CPAN::Query
CSL_db db_sub
CSL_user nobody_sub
CSL_passwd no_pass_sub
CSL_tt2 "tt2_sub"
CSL_html_root "store_sub"
CSL_html_uri "docs_sub"

<Location "/search">
   SetHandler perl-script
   PerlResponseHandler Apache2::CPAN::Query->search
</Location>
<LocationMatch "/~[A-Za-z0-9-]+">
   SetHandler perl-script
   PerlResponseHandler Apache2::CPAN::Query->cpanid
</LocationMatch>
<Location "/author">
   SetHandler perl-script
   PerlResponseHandler Apache2::CPAN::Query->author
</Location>
<Location "/dist">
   SetHandler perl-script
   PerlResponseHandler Apache2::CPAN::Query->dist
</Location>
<Location "/module">
   SetHandler perl-script
   PerlResponseHandler Apache2::CPAN::Query->module
</Location>
<Location "/chapter">
   SetHandler perl-script
   PerlResponseHandler Apache2::CPAN::Query->chapter
</Location>
<Location "/recent">
   SetHandler perl-script
   PerlResponseHandler Apache2::CPAN::Query->recent



( run in 1.645 second using v1.01-cache-2.11-cpan-5b529ec07f3 )