You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by st...@apache.org on 2003/03/11 04:10:23 UTC
cvs commit: modperl-docs/src/docs/2.0/user/coding coding.pod
stas 2003/03/10 19:10:23
Modified: src/docs/2.0/user/coding coding.pod
Log:
it certainly makes sense to add a pointer to ModPerl::MethodLookup in the
normal 2.0 docs and not only porting docs
Revision Changes Path
1.18 +25 -7 modperl-docs/src/docs/2.0/user/coding/coding.pod
Index: coding.pod
===================================================================
RCS file: /home/cvs/modperl-docs/src/docs/2.0/user/coding/coding.pod,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- coding.pod 20 Feb 2003 02:50:02 -0000 1.17
+++ coding.pod 11 Mar 2003 03:10:23 -0000 1.18
@@ -8,6 +8,15 @@
=head1 Prerequisites
+=head1 Where the Methods Live
+
+mod_perl 2.0 has all its methods spread across many modules. In order
+to use these methods the modules containing them have to be loaded
+first. If you don't do that mod_perl will complain that it can't find
+the methods in question. The module
+C<L<ModPerl::MethodLookup|docs::2.0::api::ModPerl::MethodLookup>> can
+be used to find out which modules need to be used.
+
=head1 Goodies Toolkit
=head2 Environment Variables
@@ -18,19 +27,28 @@
=item *
-C<MOD_PERL> - is set to the mod_perl version the server is running
-under. e.g.:
+C<$ENV{MOD_PERL}> - is set to the mod_perl version the server is
+running under. e.g.:
mod_perl/1.99_03-dev
-If this C<$ENV{MOD_PERL}> doesn't exist, most likely you are
-not running under mod_perl.
+If C<$ENV{MOD_PERL}> doesn't exist, most likely you are not running
+under mod_perl.
+
+ die "I refuse to work without mod_perl!" unless exists $ENV{MOD_PERL};
+
+However to check which version is used it's better to use the
+following technique:
+
+ use mod_perl;
+ use constant MP2 => ($mod_perl::VERSION >= 1.99);
+ # die "I want mod_perl 2.0!" unless MP2;
=item *
-C<GATEWAY_INTERFACE> - is set to C<CGI-Perl/1.1> for compatibility
-with mod_perl 1.0. This variable is deprecated in mod_perl 2.0. Use
-C<MOD_PERL> instead.
+C<$ENV{GATEWAY_INTERFACE}> - is set to C<CGI-Perl/1.1> for
+compatibility with mod_perl 1.0. This variable is deprecated in
+mod_perl 2.0. Use C<$ENV{MOD_PERL}> instead.
=back