Clare, Bruce W wrote:
I'm attempting to run Scoop 0.9 (scoop.kuro5hin.org) under Apache2/mod_perl
2.0 running on Windows 2000, but the application was written for Apache/mp
1.x, so it uses Apache::SIG (and possibly other) modules that are no longer
in mod_perl.
The mod_perl developer documentation for porting from 1.x to 2.x doesn't
really cover the missing modules, other than to say you can use
Apache::compat to allow use of deprecated methods. This doesn't do the job
here, which makes sense because the SIG module isn't even installed on my
system. Is there any resource that discusses the changes between mod_perl
1.x and 2.x in more detail than the current developer document? The key
point here is what has been deprecated/removed/rearchitected in mod_perl
2.x? and how do I replace it?
The changes are documented here:
http://perl.apache.org/docs/2.0/user/compat/compat.html

I haven't put it into the developer's guide, but the user's guide. Because the user's guide is for all people who write mod_perl code. The developer's guide is for those who tinker with the core. I'll put an xref to the above doc to avoid this problem in the fuure.

Apache::compat is certainly incomplete, as you have just figured out, and that doc is synced with Apache::compat. But we are getting there. Please keep reporting those missing things.

I'm not sure if mod_perl 2.0 will ever need this module (especially with perl 5.8.0 which has safe signals). So here is a stub that let's your 1.0 code run as is. It'll be in CVS soonish.

Index: lib/Apache/compat.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v
retrieving revision 1.71
diff -u -r1.71 compat.pm
--- lib/Apache/compat.pm 23 Nov 2002 22:35:06 -0000 1.71
+++ lib/Apache/compat.pm 4 Dec 2002 02:23:01 -0000
@@ -509,5 +509,14 @@
APR::Table::make($r->pool, $nelts);
}

+package Apache::SIG;
+
+use Apache::Const -compile => 'DECLINED';
+
+sub handler {
+ # don't set the SIGPIPE
+ return Apache::DECLINED;
+}
+
1;
__END__


__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com



Reply via email to