speeves wrote:This source code was the saving grace for me. If we could add the link to:
Stas Bekman wrote:
[...]
http://search.cpan.org/src/STAS/Apache-Peek-1.01/t/response/TestApachePeek/basic.pm
http://search.cpan.org/src/STAS/Apache-Peek-1.01/t/response/TestApachePeek/basic.pm
into the documentation, that would be great.
hat did it!!! Thank you so much for your patience and help with all that I am working on here. After I test these changes on modperl 1 tomorrow, I should be able to upload it to CPAN, and it will be ready for prime-time... (fingers crossed ;) )
Based on your porting experience if you have additions/corrections to these two documents:
http://perl.apache.org/docs/2.0/user/porting/porting.html
http://perl.apache.org/docs/2.0/user/porting/compat.html
please submit those here.
BTW, I have updated the info on the constants:
http://perl.apache.org/docs/2.0/user/porting/compat.html#mod_perl_1_0_and_2_0_Constants_Coexistence
__________________________________________________________________ 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
Also, it would probably be nice to have a link from:
http://perl.apache.org/docs/2.0/user/porting/porting.html#Making_Code_Conditional_on_Running_mod_perl_Version
to
http://perl.apache.org/docs/2.0/user/porting/compat.html#mod_perl_1_0_and_2_0_Constants_Coexistence
that would help the "porter" to understand the overall picture of what needs to be done to allow the single code-base to work with both mod_perls...
Finally, I found that the PAUSE server did not recognize the $VERSION number, (returned as undef), until I placed it above the BEGIN {} block as following:
package Apache::AuthNetLDAP;
use strict; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
use Net::LDAP; use mod_perl;
require Exporter;
@ISA = qw(Exporter AutoLoader); # Items to export into callers namespace by default. Note: do not export # names by default without a very good reason. Use EXPORT_OK instead. # Do not simply export all your public functions/methods/constants. @EXPORT = qw(
); $VERSION = '0.21';
# setting the constants to help identify which version of mod_perl # is installed use constant MP2 => ($mod_perl::VERSION >= 1.99);
# test for the version of mod_perl, and use the appropriate libraries BEGIN { if (MP2) { require Apache::Const; require Apache::Access; require Apache::Connection; require Apache::Log; require Apache::RequestRec; require Apache::RequestUtil; Apache::Const->import(-compile => 'HTTP_UNAUTHORIZED','OK'); } else { require Apache::Constants; Apache::Constants->import('HTTP_UNAUTHORIZED','OK'); } }
# Preloaded methods go here.
#handles Apache requests sub handler { ... }
Thanks again for all of your help! If you know of any modules that need porting in a like manner, feel free to contact me and I would be happy to help out.
speeves cws