Apache-Roaming

 view release on metacpan or  search on metacpan

Makefile.PL  view on Meta::CPAN

use ExtUtils::MakeMaker;
use Getopt::Long;
use Cwd;


use vars qw($opt_config);
Getopt::Long::GetOptions('config');


my %prereq = ('File::Spec' => 0,
	      'Data::Dumper' => 0,
	      'URI::Escape' => 0,
	      'Apache' => 0);

use lib 'lib';
eval { require Apache::Roaming::LiPrefs::Config };

my $cfg;
eval {require File::Spec; require Data::Dumper};
if (!$@  &&
    (!($cfg = eval { require ".status"})  or  $opt_config)) {
    $cfg = {} if !$cfg or ref($cfg) ne 'HASH';
    my $httpd_path = $cfg->{'httpd_path'};
    if (!$httpd_path) {
	foreach my $dir (File::Spec->path()) {
	    my $file = File::Spec->catfile($dir, "httpd");
	    if (-x $file) {
		$httpd_path = $file;
		last;

Makefile.PL  view on Meta::CPAN

    $cfg->{'user_file'} = File::Spec->catfile($tdir, "htusers");
    my $log_dir = File::Spec->catdir($tdir, "logs");
    $cfg->{'log_dir'} = $log_dir;
    $cfg->{'access_log'} = File::Spec->catfile($log_dir, "access.log");
    $cfg->{'error_log'} = File::Spec->catfile($log_dir, "error.log");
    $cfg->{'lock_file'} = File::Spec->catfile($log_dir, "httpd.lck");
    $cfg->{'pid_file'} = File::Spec->catfile($log_dir, "httpd.pid");
    my $o_dir = $cfg->{'output_dir'} = File::Spec->catdir($tdir, "output");
    $cfg->{'roaming_dir'} = File::Spec->catdir($o_dir, "roaming");

    my $dump = Data::Dumper->new([$cfg], ['cfg']);
    $dump->Indent(1);
    if (!open(STATUS, ">.status")  ||
	!(print STATUS $dump->Dump())  ||
	!close(STATUS)) {
	die "Error while creating file .status: $!";
    }

    my $reply = prompt("Do you want to configure the Apache::Roaming::LiPrefs module?", "y");
    if ($reply =~ /y/i) {
	foreach my $ref

Makefile.PL  view on Meta::CPAN

if (!open(CONF, ">$cfg->{'types_conf'}")  ||  !close(CONF)) {
    die "Error while writing $cfg->{'types_conf'}: $!";
}

my $config_dir = File::Spec->catdir(File::Spec->curdir(),
				    "lib", "Apache", "Roaming", "LiPrefs");
if (!-d $config_dir   and  !(mkdir $config_dir, 0755)) {
    die "Error while creating directory $config_dir";
}
my $config_file = File::Spec->catfile($config_dir, "Config.pm");
my $initial = Data::Dumper->new([\%Apache::Roaming::LiPrefs::INITIAL],
				['initial']);
$initial->Indent(1);
my $always = Data::Dumper->new([\%Apache::Roaming::LiPrefs::ALWAYS],
			       ['always']);
$always->Indent(1);
my $config_contents = sprintf(<<'EOF', $initial->Dump(), $always->Dump());
package Apache::Roaming::LiPrefs::Config;
my %s
my %s
%%Apache::Roaming::LiPrefs::INITIAL = %%$initial;
%%Apache::Roaming::LiPrefs::ALWAYS = %%$always;
1;
EOF

lib/Bundle/Apache/Roaming.pm  view on Meta::CPAN


=head1 SYNOPSIS

 perl -MCPAN -e 'install Bundle::Apache::Roaming'


=head1 CONTENTS

File::Spec

Data::Dumper

Apache

Apache::Roaming


=head1 DESCRIPTION

This bundle defines all prerequisite modules for Apache::Roaming.

lib/Bundle/Apache/Roaming.pm  view on Meta::CPAN


All rights reserved.

You may distribute this module under the terms of either
the GNU General Public License or the Artistic License, as
specified in the Perl README file.


=head1 SEE ALSO

L<CPAN(3)>, L<File::Spec(3)>, L<Data::Dumper(3)>, L<Apache(3)>,
L<Apache::Roaming(3)>

=cut



( run in 0.242 second using v1.01-cache-2.11-cpan-4d50c553e7e )