logo       

Re: [mp2 Patch] Simple changes to current Apache::Reload for mp1 & mp2: msg#00152

Subject: Re: [mp2 Patch] Simple changes to current Apache::Reload for mp1 & mp2
Philippe M. Chiasson wrote:
I needed this simple patch to get Apache::Reload working in mp1.

Any objections to at least applying this so it is ready for possible
inclusion in mp1's upcoming release?

Of course, if Steve Hay's suggestions make it through, keeping the
backwards compatibility would become important as well.

Gozer out.

you obviously haven't tested it with perl 5.005. what about the 'warnings' 
pragma?

I think Apache::Reload is simple enough to have two copies of it, adjusted for each mod_perl generation.

If we "hijack" Matt's distro and keep it as a separate module on CPAN, only syncing modperl and modperl-2.0 trees, then it's a whole different story. but again we hit this problem with PAUSE still not quite supporting bundling :( (i.e. we don't want CPAN.pm to try to install mod_perl, when someone is trying to install Apache::Reload)

Proposal: keep the two separate for now, just make sure that the versions are different. For example 1.00 for mp1 and 2.00 for mp2. For the next release(s) hopefully PAUSE will support bundles and then we can decide how to act.

Index: lib/Apache/Reload.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/lib/Apache/Reload.pm,v
retrieving revision 1.11
diff -u -I$Id -r1.11 Reload.pm
--- lib/Apache/Reload.pm        3 Jun 2003 00:09:04 -0000       1.11
+++ lib/Apache/Reload.pm        18 Jun 2003 05:16:07 -0000
@@ -3,15 +3,23 @@
 use strict;
 use warnings FATAL => 'all';
-use mod_perl 1.99;
+use mod_perl;
-our $VERSION = '0.09';
+use constant MOD_PERL2 => $mod_perl::VERSION >= 1.99;
-use Apache::Const -compile => qw(OK);
+our $VERSION = '0.09';
-use Apache::Connection;
-use Apache::ServerUtil;
-use Apache::RequestUtil;
+if (MOD_PERL2) {
+    require Apache::Const;
+    Apache::Const->import(qw(OK));
+    require Apache::Connection;
+    require Apache::ServerUtil;
+    require Apache::RequestUtil;
+}
+else {
+    require Apache::Constants;
+    Apache::Constants->import(qw(OK));
+}
use vars qw(%INCS %Stat $TouchTime %UndefFields);



--


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@xxxxxxxxxx http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
audio.irate.dev...    yellowdog.gener...    ietf.ips/2002-0...    xfree86.fonts/2...    busybox/2003-07...    emacs.jdee/2004...    linux.mandrake....    hardware.microc...    user-groups.lin...    science.analysi...    version-control...    db.filemaker.de...    cluster.openmos...    mail.eyebrowse....    text.xml.xerces...    kde.devel.kwrit...    finance.moneyda...    gcc.regression/...    network.routing...    os.freebsd.deve...    recreation.radi...    qnx.openqnx.dev...    python.xml/2002...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe