Index: src/docs/2.0/user/porting/porting.pod
===================================================================
--- src/docs/2.0/user/porting/porting.pod	(revision 371731)
+++ src/docs/2.0/user/porting/porting.pod	(working copy)
@@ -1209,10 +1209,11 @@
 
 To continue our example above, let's say we want to support opening a
 filehandle in both mod_perl 2.0 and mod_perl 1.0. Our code can make
-use of the variable C<$mod_perl::VERSION>:
+use of the environment variable C<$ENV{MOD_PERL_API_VERSION}>
 
   use mod_perl;
-  use constant MP2 => ($mod_perl::VERSION >= 1.99);
+  use constant MP2 => ( exists $ENV{MOD_PERL_API_VERSION} and 
+                        $ENV{MOD_PERL_API_VERSION} >= 2 ); 
   # ...
   require Symbol if MP2;
   # ...
@@ -1220,25 +1221,14 @@
   my $fh = MP2 ? Symbol::gensym : Apache->gensym;
   open $fh, $file or die "Can't open $file: $!";
 
-Though, make sure that you don't use C<$mod_perl::VERSION> string
-anywhere in the code before you have declared your module's own
-C<$VERSION>, since PAUSE will pick the wrong version when you submit
-the module on CPAN. It requires that module's C<$VERSION> will be
-declared first. You can verify whether it'll pick the I<Foo.pm>'s
-version correctly, by running this code:
-
-  % perl -MExtUtils::MakeMaker -le 'print MM->parse_version(shift)' Foo.pm
-
-There is more information about this issue here:
-http://pause.perl.org/pause/query?ACTION=pause_04about#conventions
-
 Some modules, like C<CGI.pm> may work under mod_perl and without it,
 and will want to use the mod_perl 1.0 API if that's available, or
 mod_perl 2.0 API otherwise. So the following idiom could be used for
 this purpose.
 
   use constant MP_GEN => $ENV{MOD_PERL}
-      ? eval { require mod_perl;  $mod_perl::VERSION >= 1.99 ? 2 : 1 }
+      ? { ( exists $ENV{MOD_PERL_API_VERSION} and 
+            $ENV{MOD_PERL_API_VERSION} >= 2 ) ? 2 : 1 }
       : 0;
 
 It sets the constant C<MP_GEN> to 0 if mod_perl is not available, to 1
@@ -1322,7 +1312,8 @@
   use warnings;
   
   use mod_perl;
-  use constant MP2 => $mod_perl::VERSION < 1.99 ? 0 : 1;
+  use constant MP2 => ( exists $ENV{MOD_PERL_API_VERSION} and 
+                        $ENV{MOD_PERL_API_VERSION >= 2 ); 
   
   BEGIN {
       if (MP2) {
@@ -1377,10 +1368,11 @@
   use warnings;
   
   use mod_perl;
-  use constant MP2 => $mod_perl::VERSION < 1.99 ? 0 : 1;
+  use constant MP2 => ( exists $ENV{MOD_PERL_API_VERSION} and 
+                        $ENV{MOD_PERL_API_VERSION >= 2 ); 
   
   BEGIN {
-      warn "running $mod_perl::VERSION!\n";
+      warn "running $ENV{MOD_PERL_API_VERSION}\n";
       if (MP2) {
           require Apache2::RequestRec;
           require Apache2::RequestIO;
Index: src/docs/2.0/user/porting/compat.pod
===================================================================
--- src/docs/2.0/user/porting/compat.pod	(revision 371731)
+++ src/docs/2.0/user/porting/compat.pod	(working copy)
@@ -352,7 +352,9 @@
   use warnings;
   
   use mod_perl;
-  use constant MP2 => $mod_perl::VERSION >= 1.99;
+  use constant MP2 => ( exists $ENV{MOD_PERL_API_VERSION} and 
+                        $ENV{MOD_PERL_API_VERSION} >= 2 ); 
+
   
   BEGIN {
       if (MP2) {
@@ -495,16 +497,15 @@
   if ($ENV{MOD_PERL}) { ... }
 
 To check for a specific version it's better to use
-C<$mod_perl::VERSION>:
+C<$ENV{MOD_PERL_API_VERSION}>
 
   use mod_perl;
-  use constant MP2 => ($mod_perl::VERSION >= 1.99);
+  use constant MP2 => ( exists $ENV{MOD_PERL_API_VERSION} and 
+                        $ENV{MOD_PERL_API_VERSION} >= 2 ); 
 
 
 
 
-
-
 =head1 C<Apache::> Methods
 
 
Index: src/docs/2.0/user/coding/coding.pod
===================================================================
--- src/docs/2.0/user/coding/coding.pod	(revision 371731)
+++ src/docs/2.0/user/coding/coding.pod	(working copy)
@@ -142,7 +142,9 @@
 following technique:
 
   use mod_perl;
-  use constant MP2 => ($mod_perl::VERSION >= 1.99);
+  use constant MP2 => ( exists $ENV{MOD_PERL_API_VERSION} and 
+                        $ENV{MOD_PERL_API_VERSION} >= 2 ); 
+
   # die "I want mod_perl 2.0!" unless MP2;
 
 =back
Index: src/docs/2.0/user/config/config.pod
===================================================================
--- src/docs/2.0/user/config/config.pod	(revision 371731)
+++ src/docs/2.0/user/config/config.pod	(working copy)
@@ -790,7 +790,7 @@
 
 =item *
 
-C<MOD_PERL> (always)
+C<MOD_PERL> and C<MOD_PERL_API_VERSION> (always)
 
 =item *
 
Index: src/docs/2.0/user/Changes.pod
===================================================================
--- src/docs/2.0/user/Changes.pod	(revision 371731)
+++ src/docs/2.0/user/Changes.pod	(working copy)
@@ -11,6 +11,10 @@
 
 =head1 ...
 
+Replaced the idiom of using $mod_perl::VERSION as a test for whether
+or not you're running under mod_perl 1.x or mod_perl 2.x with a more
+accurate and general test. By Frank Wiles E<lt>frankE<lt>atE<gt>wiles.orgE<gt>.
+
 A new troubleshooting section on how to resolve can't locate file foo,
 when there is a system limit on the maximum open files. By Ken Simpson
 E<lt>ksimpsonE<lt>atE<gt>larch.mailchannels.comE<gt>.
