Per Einar Ellefsen wrote:
At 11:10 18.06.2002, Thomas Klausner wrote:

Hi!

Recently, I was /using/ the docs once again, and I stumbled on the
Code Snippet "mod_rewrite in Perl"
(docs/1.0/guide/snippets.html#toc_mod_rewrite_in_Perl)

One year ago, I wrote a module that does exactly that. It's on CPAN,
called CGI::URI2param and includes a PerlInitHandler for mod_perl
support (Apache::URI2param).

So, two questions:

1: Would it make sense to link to this module from this section, and -
more generally - would it make sense to link to CPAN-modules
implementing some of those snippets.

+1

+1. That's clearly the best way... Teach how it's done, so that people can learn, and then point to what they should *really* use. Go ahead with patches.. I tried to do the same with Lincoln's tricks tutorial, because there are *many* snippets in it, but some are CPAN modules now, and so should be used.

2: In the example, $r->args is used to set the value. I am using
$r->param (together with Apache::Request->instance). Would $r->args be
better suited?


Oops. I was going to say "use $r->param etc etc.." because I thought you meant getting the value... Well, the problem is that if the user of your module isn't using Apache::Request, you're mildly screwed as your params won't pass on. For example if he uses CGI.pm, he won't get your params. So it might be a better idea to reconstruct the query string in some way and set $r->args, which will then be reparsed during the content handling... This however you might be able to do directly with Apache::Request or CGI.pm, I don't know really.

this part probably belongs to the modperl list.

And yes you shouldn't use $r->args to set if you can use Apache::Request. In 2.0 $r->args doesn't do that anymore (only in compat and slow), and hopefully Apache::Request will be a part of mod_perl.

But your post has triggered another question. There are just a few people at this list, so whoever posts here won't get the same exposure as if they were posting to the modperl list. I think Doug was right by suggesting that in the documents we will suggest to discuss the documentation at the modperl list. And this list will stay primerly for discussing the mechanics and physical problems of the docs/site (like auto-docs generation).

So unless people think differently we should adjust the docs to point to the modperl list, where relevant.

__________________________________________________________________
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


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to