AcePerl
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
$SITE_DEFS Location of the directory that hold's AceBrowser's database-specific
configuration files, e.g. /usr/local/apache/conf/ace/
$HTML_PATH Location of AceBrowser's HTML files and images, e.g. ~www/htdocs/ace/
$CGI_PATH Location of AceBrowser's CGI scripts, e.g. ~www/cgi-bin/ace/
=head1 SEE ALSO
L<Ace>
=head1 AUTHOR
Lincoln Stein <lstein\@cshl.org>
Copyright (c) 1997-1998 Cold Spring Harbor Laboratory
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself. See DISCLAIMER.txt for
disclaimers of warranty.
=cut
END
close F;
eval <<END;
sub MY::postamble {
'
install-browser :
util/install.pl acebrowser/htdocs $html_path
util/install.pl acebrowser/cgi-bin $cgi_path
util/install.pl acebrowser/conf $conf_path
mkdir $html_path/images
chmod go+rwx $html_path/images
';
}
END
print qq(\n*** After "make install", run "make install-browser" to install acebrowser files. ***\n\n);
}
sub get_path {
my ($description,$pathref) = @_;
$$pathref = expand_twiddles(prompt("Directory for the $description (~username ok):",$$pathref));
return if -d $$pathref;
return if prompt("$$pathref does not exist. Shall I create it for you?",'y') !~ /[yY]/;
mkpath($$pathref) or warn "Couldn't create $$pathref. Please create it before installing.\n";
}
sub expand_twiddles {
my $path = shift;
my ($to_expand,$homedir);
return $path unless $path =~ m!^~([^/]*)!;
if ($to_expand = $1) {
$homedir = (getpwnam($to_expand))[7];
} else {
$homedir = (getpwuid($<))[7];
}
return $path unless $homedir;
$path =~ s!^~[^/]*!$homedir!;
return $path;
}
( run in 0.791 second using v1.01-cache-2.11-cpan-99c4e6809bf )