Shannon Eric Peevey wrote:
Stas Bekman wrote:

This source code was the saving grace for me. If we could add the link to: http://search.cpan.org/src/STAS/Apache-Peek-1.01/t/response/TestApachePeek/basic.pm


into the documentation, that would be great.

No need to, I've already merged it into the docs: http://perl.apache.org/docs/2.0/user/porting/compat.html#mod_perl_1_0_and_2_0_Constants_Coexistence

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...

done, thanks for the suggestion.


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:

Yes, not before the BEGIN block, but before any other occurence of the string VERSION. Some claim that this is a bug, others that it's a feature. Depends on who you ask.


BTW, to verify your module that its version is parsable correctly by PAUSE, you don't need to submit it to pause, but use:

perl -MExtUtils::MakeMaker -le 'print MM->parse_version(shift)' 'file'

as explained at:
http://pause.perl.org/pause/query?ACTION=pause_04about#conventions

I've added a note about this to the porting docs.

package Apache::AuthNetLDAP;
[...]
$VERSION = '0.21';

# setting the constants to help identify which version of mod_perl
# is installed
use constant MP2 => ($mod_perl::VERSION >= 1.99);
[...]
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.

I think there are quite a few modules that need porting. Just go to CPAN pick one and go with it. Probably first contact the author so you don't step on their toes.


I'm planning on adding more docs as I doing porting myself, and if others find new tricks and useful additions to the existing docs don't hesitate to post them here, just like Shannon did. Which is *very* helpful! Thank you Shannon!

I'm also thinking about creating several modules to ease the porting, I'll post more on this when I'll get around writing some first prototypes.

__________________________________________________________________
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