Mailing List Archive

Apache::ASP with latest mod_perl-2
The following two patches, against Apache-ASP-2.57, work for
me in getting a simple Apache::ASP page to display with the
latest mod_perl-2 version on CPAN (note that this is the
official 2.0 release). These patches takes into account the
renaming that was done as described at
http://perl.apache.org/docs/2.0/rename.html

For Apache::ASP:

===============================================================
--- ASP.pm.orig Thu Jan 29 02:04:44 2004
+++ ASP.pm Sat May 21 22:33:04 2005
@@ -50,7 +50,7 @@
# Only pre-load these if in a mod_perl environment for sharing memory post fork.
# These will not be loaded then for CGI until absolutely necessary at runtime
push(@load_modules, qw(
- Apache2 mod_perl
+ mod_perl
MLDBM::Serializer::Data::Dumper Devel::Symdump CGI
Apache::ASP::StateManager Apache::ASP::Session Apache::ASP::Application
Apache::ASP::StatINC Apache::ASP::Error
@@ -161,8 +161,10 @@
# rarely happens, but just in case
my $filename;
unless($filename = eval { $r->filename }) {
- if($filename = eval { Apache->request->filename }) {
- $r = Apache->request;
+ my $rtest = $ModPerl2 ?
+ Apache2::RequestUtil->request() : Apache->request();
+ if($filename = eval { $rtest->filename }) {
+ $r = $rtest;
} else {
return &DSOError($r);
}

===================================================================

and for Apache::ASP::ApacheCommon:

==================================================================
--- lib/Apache/ASP/ApacheCommon.pm.orig Fri Oct 10 18:15:32 2003
+++ lib/Apache/ASP/ApacheCommon.pm Sat May 21 22:32:14 2005
@@ -10,14 +10,14 @@
# but what I found during testing.
# --jc, 5/5/2003

-use Apache::RequestRec ();
-use Apache::RequestUtil ();
-use Apache::RequestIO ();
-use Apache::Response ();
+use Apache2::RequestRec ();
+use Apache2::RequestUtil ();
+use Apache2::RequestIO ();
+use Apache2::Response ();
use APR::Table ();
use APR::Pool ();
-use Apache::Connection ();
-use Apache::Server ();
-use Apache::Log ();
+use Apache2::Connection ();
+use Apache2::Server ();
+use Apache2::Log ();

1;

======================================================================

--
best regards,
randy kobes

---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org
Re: Apache::ASP with latest mod_perl-2 [ In reply to ]
Randy Kobes wrote:
> The following two patches, against Apache-ASP-2.57, work for
> me in getting a simple Apache::ASP page to display with the
> latest mod_perl-2 version on CPAN (note that this is the
> official 2.0 release). These patches takes into account the
> renaming that was done as described at
> http://perl.apache.org/docs/2.0/rename.html
>

Thanks Randy. I have just integrated your changes and have fixed
Apache::ASP to run cleanly under the latest mod_perl 2.0 release,
such that all the examples except those using Apache::Filter work.

Regards & thanks for your help as always!

Josh

---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org