Update of /cvs/scoop/scoop/lib
In directory lithium.sabren.com:/tmp/cvs-serv4073/lib
Modified Files:
Tag: scoop_1_2-dev
Scoop.pm
Log Message:
Now we're getting down to business. Initial checking of apache2 support into the 1.2-dev tree. Unfortunately, support in the installer isn't there yet, and the new config file templates aren't done. Still, it will work under both apache 1.3 and apache 2. More to follow soon. -j
Index: Scoop.pm
===================================================================
RCS file: /cvs/scoop/scoop/lib/Scoop.pm,v
retrieving revision 1.146
retrieving revision 1.146.2.1
diff -C2 -d -r1.146 -r1.146.2.1
*** Scoop.pm 27 Apr 2006 03:52:47 -0000 1.146
--- Scoop.pm 26 Aug 2006 20:05:59 -0000 1.146.2.1
***************
*** 62,69 ****
#
sub initialize {
! my $self = shift;
# Set the apache request object
! $self->_set_apache_request();
# Config stuff
--- 62,70 ----
#
sub initialize {
! my $self = shift;
! my $r = shift;
# Set the apache request object
! $self->_set_apache_request($r);
# Config stuff
***************
*** 817,824 ****
sub _set_apache_request {
my $self = shift;
! my $r = Apache->request();
!
# set {APACHE} to the request obj
! $self->{APACHE} = $r;
return $self;
}
--- 818,831 ----
sub _set_apache_request {
my $self = shift;
! my $r = shift;
! my $req;
! if($Scoop::MP2){
! $req = Apache2::Request->new($r);
! }
! else {
! $req = Apache->request();
! }
# set {APACHE} to the request obj
! $self->{APACHE} = $req;
return $self;
}
***************
*** 835,842 ****
sub _set_request_params {
my $self = shift;
! use Apache::Request;
! my $q = Apache::Request->new( $self->{APACHE} );
! $self->{APR} = $q;
my $all_args = {};
--- 842,854 ----
sub _set_request_params {
my $self = shift;
+ BEGIN {
+
+ my $use = ($Scoop::MP2) ? 'use Apache2::Request' : 'use Apache::Request';
+ eval "$use";
+ }
! my $use = ($Scoop::MP2) ? "Apache2::Request" : "Apache::Request";
! my $q = $use->new( $self->{APACHE} );
! $self->{APR} = $q;
my $all_args = {};