Hi,
While using latest mod_perl2 RC6 with latest Embperl from CVS it won't work because that modules renaming issue [http://perl.apache.org/docs/2.0/rename.html].
So I did some renaming stuff with http://people.apache.org/~geoff/fixme. And produced a little patch.
Maybe someone finds that patch useful.
Index: Embperl.pm
===================================================================
RCS file: /home/cvspublic/embperl/Embperl.pm,v
retrieving revision 1.199
diff -u -r1.199 Embperl.pm
--- Embperl.pm 6 May 2005 07:15:36 -0000 1.199
+++ Embperl.pm 6 May 2005 22:06:28 -0000
@@ -86,12 +86,12 @@
}
else
{
- require Apache::ServerRec ;
+ require Apache2::ServerRec ;
}
- require Apache::ServerUtil ;
- require Apache::RequestRec ;
- require Apache::RequestUtil ;
- require Apache::SubRequest ;
+ require Apache2::ServerUtil ;
+ require Apache2::RequestRec ;
+ require Apache2::RequestUtil ;
+ require Apache2::SubRequest ;
$srv_rec = Apache -> server ;
}
}
@@ -196,8 +196,8 @@
{
if (!$Embperl::modperl2)
{
- eval 'use Apache::Constants qw(&OPT_EXECCGI &DECLINED &OK &FORBIDDEN)'
;
- die "use Apache::Constants failed: $@" if ($@);
+ eval 'use Apache2::Constants qw(&OPT_EXECCGI &DECLINED &OK
&FORBIDDEN)' ;
+ die "use Apache2::Constants failed: $@" if ($@);
}
elsif ($Embperl::modperlapi >= 2)
{
@@ -206,8 +206,8 @@
}
else
{
- eval 'use Apache::Const qw(&OPT_EXECCGI &DECLINED &OK &FORBIDDEN)' ;
- die "use Apache::Const failed: $@" if ($@);
+ eval 'use Apache2::Const qw(&OPT_EXECCGI &DECLINED &OK &FORBIDDEN)' ;
+ die "use Apache2::Const failed: $@" if ($@);
}
}
@@ -259,11 +259,11 @@
{
if ($Embperl::modperlapi < 2)
{
- require Apache::compat # Apache::compat is needed for CGI.pm
+ require Apache2::compat # Apache2::compat is needed for CGI.pm
}
else
{
- require Apache2::compat # Apache::compat is needed for CGI.pm
+ require Apache2::compat # Apache2::compat is needed for CGI.pm
}
}
require CGI ;
Index: EmbperlObject.pm
===================================================================
RCS file: /home/cvspublic/embperl/EmbperlObject.pm,v
retrieving revision 1.47
diff -u -r1.47 EmbperlObject.pm
--- EmbperlObject.pm 23 Jan 2004 06:50:54 -0000 1.47
+++ EmbperlObject.pm 6 May 2005 22:06:29 -0000
@@ -27,8 +27,8 @@
if (defined ($ENV{MOD_PERL}))
{
- eval 'use Apache::Constants qw(&OPT_EXECCGI &DECLINED &OK &FORBIDDEN
&NOT_FOUND) ;' ;
- die "use Apache::Constants failed: $@" if ($@);
+ eval 'use Apache2::Constants qw(&OPT_EXECCGI &DECLINED &OK &FORBIDDEN
&NOT_FOUND) ;' ;
+ die "use Apache2::Constants failed: $@" if ($@);
}
else
{
Index: Faq.pod
===================================================================
RCS file: /home/cvspublic/embperl/Faq.pod,v
retrieving revision 1.20
diff -u -r1.20 Faq.pod
--- Faq.pod 22 Oct 2002 05:29:04 -0000 1.20
+++ Faq.pod 6 May 2005 22:06:29 -0000
@@ -151,7 +151,7 @@
=item 1.) go to your mod_perl directory, change to src/modules/perl and edit
the
Makefile so that it contains the line
- #STATIC_EXTS = Apache Apache::Constants HTML::Embperl
+ #STATIC_EXTS = Apache Apache2::Constants HTML::Embperl
=item 2.) add a definition for EPDIR and change the ONJ= line so that it looks
like this:
@@ -823,7 +823,7 @@
[-
use Apache;
- use Apache::Constants qw(REDIRECT);
+ use Apache2::Constants qw(REDIRECT);
$req_rec->header_out("Location" => "http://$ENV{HTTP_HOST}/specials/");
$req_rec->status(REDIRECT);
Index: Makefile.PL
===================================================================
RCS file: /home/cvspublic/embperl/Makefile.PL,v
retrieving revision 1.77
diff -u -r1.77 Makefile.PL
--- Makefile.PL 6 May 2005 07:15:36 -0000 1.77
+++ Makefile.PL 6 May 2005 22:06:30 -0000
@@ -543,11 +543,11 @@
if (!$apache && $apache_src eq '')
{
# check for mod_perl 2.0
- eval 'use Apache2; use Apache::BuildConfig' ;
+ eval 'use Apache2; use Apache2::BuildConfig' ;
if ($@ eq '')
{
- $mp2cfg = Apache::BuildConfig -> new ;
+ $mp2cfg = Apache2::BuildConfig -> new ;
$apache_src = $mp2cfg -> {MP_AP_PREFIX} || $mp2cfg -> {ap_includedir} ;
print "Found mod_perl 2.0\n" ;
}
@@ -584,11 +584,11 @@
if ($vers[0] =~ m#/2#)
{
# check for mod_perl 2.0
- eval 'use Apache2; use Apache::BuildConfig' ;
+ eval 'use Apache2; use Apache2::BuildConfig' ;
if ($@ eq '')
{
- $mp2cfg = Apache::BuildConfig -> new ;
+ $mp2cfg = Apache2::BuildConfig -> new ;
print "Found mod_perl 2.0\n" ;
}
}
@@ -960,8 +960,8 @@
}
else
{
- require Apache::Build ;
- $dynlib->{'OTHERLDFLAGS'} = Apache::Build->new->otherldflags ;
+ require Apache2::Build ;
+ $dynlib->{'OTHERLDFLAGS'} = Apache2::Build->new->otherldflags ;
}
}
else
Index: Embperl/Syntax/SSI.pm
===================================================================
RCS file: /home/cvspublic/embperl/Embperl/Syntax/SSI.pm,v
retrieving revision 1.3
diff -u -r1.3 SSI.pm
--- Embperl/Syntax/SSI.pm 23 Jan 2004 06:50:57 -0000 1.3
+++ Embperl/Syntax/SSI.pm 6 May 2005 22:06:37 -0000
@@ -24,7 +24,7 @@
local $^W = 0 ;
require POSIX ;
- eval "use Apache::Constants qw(:common OPT_INCNOEXEC);" ;
+ eval "use Apache2::Constants qw(:common OPT_INCNOEXEC);" ;
} ;
use strict ;
Index: podsrc/Config.spod
===================================================================
RCS file: /home/cvspublic/embperl/podsrc/Config.spod,v
retrieving revision 1.17
diff -u -r1.17 Config.spod
--- podsrc/Config.spod 12 Mar 2005 13:46:07 -0000 1.17
+++ podsrc/Config.spod 6 May 2005 22:06:38 -0000
@@ -1541,7 +1541,7 @@
=head2 *METHOD $request / / apache_req / 2.0b6 / no
Returns a reference to mod_perls Apache request object. In mod_perl 1 this is
of
-type C<Apache::> in mod_perl 2 it's a C<Apache::RequestRec>.
+type C<Apache::> in mod_perl 2 it's a C<Apache2::RequestRec>.
=head2 *METHOD $request / / config / 2.0b6 / no
Index: test/conf/httpd.conf.src
===================================================================
RCS file: /home/cvspublic/embperl/test/conf/httpd.conf.src,v
retrieving revision 1.57
diff -u -r1.57 httpd.conf.src
--- test/conf/httpd.conf.src 28 Feb 2005 06:31:00 -0000 1.57
+++ test/conf/httpd.conf.src 6 May 2005 22:06:39 -0000
@@ -652,7 +652,7 @@
<Location /perl-status>
SetHandler perl-script
-PerlHandler Apache::Status
+PerlHandler Apache2::Status
PerlSetVar StatusOptionsAll On
</Location>
Index: test/html/registry/Execute.htm
===================================================================
RCS file: /home/cvspublic/embperl/test/html/registry/Execute.htm,v
retrieving revision 1.8
diff -u -r1.8 Execute.htm
--- test/html/registry/Execute.htm 25 Feb 2005 08:06:22 -0000 1.8
+++ test/html/registry/Execute.htm 6 May 2005 22:06:40 -0000
@@ -12,7 +12,7 @@
# workaround for broken $r -> chdir_file in Apache::Registry on ActiveState
perl
use Cwd ;
use File::Basename ;
-eval { require Apache::compat } ;
+eval { require Apache2::compat } ;
$@ = '' ;
my $fn = $r -> filename ;--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
