};
close MAKEFILE or die $!;
$makefile =~ s/\b(test_harness\(\$\(TEST_VERBOSE\), )/$1'inc', /;
$makefile =~ s/( -I\$\(INST_ARCHLIB\))/ -Iinc$1/g;
$makefile =~ s/( "-I\$\(INST_LIB\)")/ "-Iinc"$1/g;
$makefile =~ s/^(FULLPERL = .*)/$1 "-Iinc"/m;
$makefile =~ s/^(PERL = .*)/$1 "-Iinc"/m;
# Module::Install will never be used to build the Core Perl
# Sometimes PERL_LIB and PERL_ARCHLIB get written anyway, which breaks
# PREFIX/PERL5LIB, and thus, install_share. Blank them if they exist
$makefile =~ s/^PERL_LIB = .+/PERL_LIB =/m;
#$makefile =~ s/^PERL_ARCHLIB = .+/PERL_ARCHLIB =/m;
# Perl 5.005 mentions PERL_LIB explicitly, so we have to remove that as well.
$makefile =~ s/(\"?)-I\$\(PERL_LIB\)\1//g;
# XXX - This is currently unused; not sure if it breaks other MM-users
# $makefile =~ s/^pm_to_blib\s+:\s+/pm_to_blib :: /mg;
open MAKEFILE, "> $makefile_name" or die "fix_up_makefile: Couldn't open $makefile_name: $!";
print MAKEFILE "$preamble$makefile$postamble" or die $!;
close MAKEFILE or die $!;
1;
}
sub preamble {
my ($self, $text) = @_;
$self->{preamble} = $text . $self->{preamble} if defined $text;
$self->{preamble};
}
sub postamble {
my ($self, $text) = @_;
$self->{postamble} ||= $self->admin->postamble;
$self->{postamble} .= $text if defined $text;
$self->{postamble}
}
1;
__END__
#line 377
Apache2-AuthCASSimple-0.10/inc/Module/Install/AutoInstall.pm 0000644 0001750 0001750 00000002272 11201565364 023720 0 ustar agostini agostini #line 1
package Module::Install::AutoInstall;
use strict;
use Module::Install::Base;
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
$VERSION = '0.76';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
sub AutoInstall { $_[0] }
sub run {
my $self = shift;
$self->auto_install_now(@_);
}
sub write {
my $self = shift;
$self->auto_install(@_);
}
sub auto_install {
my $self = shift;
return if $self->{done}++;
# Flatten array of arrays into a single array
my @core = map @$_, map @$_, grep ref,
$self->build_requires, $self->requires;
my @config = @_;
# We'll need Module::AutoInstall
$self->include('Module::AutoInstall');
require Module::AutoInstall;
Module::AutoInstall->import(
(@config ? (-config => \@config) : ()),
(@core ? (-core => \@core) : ()),
$self->features,
);
$self->makemaker_args( Module::AutoInstall::_make_args() );
my $class = ref($self);
$self->postamble(
"# --- $class section:\n" .
Module::AutoInstall::postamble()
);
}
sub auto_install_now {
my $self = shift;
$self->auto_install(@_);
Module::AutoInstall::do_install();
}
1;
Apache2-AuthCASSimple-0.10/inc/Module/Install/WriteAll.pm 0000644 0001750 0001750 00000001321 11201565365 023177 0 ustar agostini agostini #line 1
package Module::Install::WriteAll;
use strict;
use Module::Install::Base;
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
$VERSION = '0.76';
@ISA = qw{Module::Install::Base};
$ISCORE = 1;
}
sub WriteAll {
my $self = shift;
my %args = (
meta => 1,
sign => 0,
inline => 0,
check_nmake => 1,
@_,
);
$self->sign(1) if $args{sign};
$self->Meta->write if $args{meta};
$self->admin->WriteAll(%args) if $self->is_admin;
$self->check_nmake if $args{check_nmake};
unless ( $self->makemaker_args->{PL_FILES} ) {
$self->makemaker_args( PL_FILES => {} );
}
if ( $args{inline} ) {
$self->Inline->write;
} else {
$self->Makefile->write;
}
}
1;
Apache2-AuthCASSimple-0.10/Changes 0000644 0001750 0001750 00000002774 11201564501 017011 0 ustar agostini agostini Revision history for Perl module Apache2::AuthCASSimple
0.10 Thu, 10 May 2009 11:53:07 +0200
- add dep on Crypt::SSLeay
- swap clean login_url (0.07 was a bad idea) with uri_escape
- fix _post_to_get with $r->read closes https://rt.cpan.org/Ticket/Display.html?id=45923
- add test cases in examples
0.09 Wed, 22 Apr 2009 12:33:26 +0200
- revert use of CGI, better fix up for REMOTE_USER bug
0.08 Wed, 22 Apr 2009 08:28:46 +0200
- fix REMOTE_USER not set bug
closes cpan http://rt.cpan.org/Ticket/Display.html?id=45202
closes debian bug #525097
0.07 Thu, 2 Apr 2009 11:38:26 +0200
- parse args with CGI
- closes debian bug #521059 (thx to Luk Claes & dam) :
a missing mod_perl1 mod_perl2 translation
- clean cookie path (thx to A Ledrezen)
- clean login_url
- better logs with level debug
0.06 Thu, 11 Dec 2008 17:05:04 +0100
- add an HTTPSServer config flag, mod_perl2 can not detect SSL whithout Apache2::ModSSL
0.05 Tue, 13 May 2008 11:52:40 +0200
- clean README
- add use warnings
- move delete_session_data.pl from scripts to examples
- add copyright
- try to have better META.yml
0.0.4 Sat, 12 Apr 2008 12:51:31 +0200
- dh-make-perl don't like perl_version and version_from in Makefile.PL
0.0.3 Fri, 11 Apr 2008 10:31:45 +0200
- better Makefile, more pod test
0.0.2 Thu Mar 06 10:58:00 2008
- add missing inc and META.yml
0.0.1 Tue Jan 29 16:33:04 2008
- original version; created by ExtUtils::ModuleMaker 0.49
Apache2-AuthCASSimple-0.10/examples/ 0000755 0001750 0001750 00000000000 11201565426 017331 5 ustar agostini agostini Apache2-AuthCASSimple-0.10/examples/delete_session_data.pl 0000644 0001750 0001750 00000001770 11012254566 023671 0 ustar agostini agostini #!/usr/bin/perl
use strict;
use Fcntl ':flock';
sub clean ($)
{
my $file = shift;
print "deleting $file\n";
open(FH, ">>$file") || return -1;
flock(FH, LOCK_EX) || return -1;
unlink($file) || return -1;
flock(FH, LOCK_UN);
close(FH);
return 0;
}
my $now = time();
my $time = (3600+60);
my $dir = '/tmp';
my $cnt=0;
my $lnt=0;
my $current=0;
print "\nCleaning session in " . $dir . " (timeout = " . $time . ")\n\n";
opendir(DIR, $dir);
my @files = readdir(DIR);
foreach my $file (@files)
{
if ($file =~ /^[a-z0-9]{32}$/ )
{
if ($now - (stat($dir.'/'.$file))[8] >= $time)
{
clean($dir.'/'.$file);
clean($dir.'/Apache-Session-'.$file.'.lock');
$cnt++;
$lnt++;
}
else
{
$current++;
}
}
if ($file =~ /^Apache-Session-([a-z0-9]{32})\.lock$/ && ! -f $dir.'/'.$1 )
{
$lnt++;
clean($dir.'/'.$file);
}
}
close DIR;
print "$cnt sessions deleted\n";
print "$lnt lock sessions deleted\n";
print "$current sessions in used\n";
Apache2-AuthCASSimple-0.10/examples/apache_www/ 0000755 0001750 0001750 00000000000 11201565426 021456 5 ustar agostini agostini Apache2-AuthCASSimple-0.10/examples/apache_www/index.html 0000644 0001750 0001750 00000001161 11201540710 023437 0 ustar agostini agostini
% my $noun = 'World';
Hello <% $noun %>!
How are ya?
REMOTE_USER: -<% $ENV{REMOTE_USER} %>-
$r->user(): -<% $r->user() %>-
Direct link: ?test=yyyy&test2=aaa
% foreach my $key (sort keys %ENV) {
% print $key .' = '. $ENV{$key}."\n";
% }
<%args>
$test => undef
$test2 => undef
%args>
Apache2-AuthCASSimple-0.10/examples/apache_conf/ 0000755 0001750 0001750 00000000000 11201565426 021557 5 ustar agostini agostini Apache2-AuthCASSimple-0.10/examples/apache_conf/default 0000644 0001750 0001750 00000002222 11201541667 023125 0 ustar agostini agostini
ServerAdmin webmaster@localhost
DocumentRoot /var/www/
Options FollowSymLinks
AllowOverride None
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel debug
CustomLog /var/log/apache2/access.log combined
ErrorLog /var/log/apache2/error.log
PerlOptions +GlobalRequest
AuthType Apache2::AuthCASSimple
PerlAuthenHandler Apache2::AuthCASSimple
PerlSetVar CASServerName auth.univ.fr
PerlSetVar CASServerPath /
# PerlSetVar CASServerPort 443
# PerlSetVar CASServerNoSSL 1
PerlSetVar CASSessionTimeout 6
PerlSetVar CASSessionDirectory /tmp
# PerlSetVar CASFixDirectory /
# PerlSetVar ModProxy 1
require valid-user
# use mason for fun
SetHandler perl-script
PerlHandler HTML::Mason::ApacheHandler
Apache2-AuthCASSimple-0.10/Todo 0000644 0001750 0001750 00000000110 10750304637 016336 0 ustar agostini agostini TODO list for Perl module Apache2::AuthCASSimple
- Add mod proxy cas